From a8b9f74e0bcdac7fd83242d0a65dd947cf9056d5 Mon Sep 17 00:00:00 2001 From: Mattia Bradascio <28816406+bredamatt@users.noreply.github.com> Date: Mon, 14 Oct 2024 16:45:22 +0100 Subject: [PATCH] fix: add automatic commit to charts repo to update commi --- .github/workflows/devnet-ecr-push.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/.github/workflows/devnet-ecr-push.yml b/.github/workflows/devnet-ecr-push.yml index 05ae12e6a..0694bc560 100644 --- a/.github/workflows/devnet-ecr-push.yml +++ b/.github/workflows/devnet-ecr-push.yml @@ -104,3 +104,24 @@ jobs: run: | docker build -t ${{ secrets.AWS_ACCOUNT_ID_AO_DEVNET }}.dkr.ecr.${{ secrets.AWS_REGION_AO_DEVNET }}.amazonaws.com/$REPOSITORY:ao-su-$COMMIT_HASH -f servers/su/Dockerfile.x86 servers/su/ docker push ${{ secrets.AWS_ACCOUNT_ID_AO_DEVNET }}.dkr.ecr.${{ secrets.AWS_REGION_AO_DEVNET }}.amazonaws.com/$REPOSITORY:ao-su-$COMMIT_HASH + + update-devnet-commit-sha: + runs-on: ubuntu-latest + needs: + - build-and-push-cu + - build-and-push-mu + - build-and-push-su + + steps: + - name: Checkout Helmfile Repository + run: git clone https://github.com/permaweb/charts.git + - name: Update Helmfile `truncatedCommitSHA` + env: + TRUNCATED_SHA: ${{ env.COMMIT_HASH }} + run: | + cd charts + sed -i "s/commitSHA: \".*\"/commitSHA: \"${TRUNCATED_SHA}\"/" helmfile/devnet/commit-sha.yaml + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + git commit -am "fix: update truncatedCommitSHA to ${TRUNCATED_SHA}" + git push https://${secrets.AO_TO_CHARTS_PAT}@github.com/permaweb/charts.git main \ No newline at end of file