diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index b2cdb69..1b81ee0 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -40,8 +40,18 @@ jobs: ${{ env.IMAGE_NAME }}:${{ gitea.sha }} ${{ env.IMAGE_NAME }}:latest + - name: Checkout Infra Repository + uses: actions/checkout@v3 + with: + repository: ${{ env.INFRA_REPO }} + token: ${{ secrets.INFRA_REPO_TOKEN }} + path: infra-workspace + - name: Update Helm values.yaml for Flux run: | + # Go into the downloaded infrastructure repo + cd infra-workspace + # 1. Update the image tag in your local Helm chart using sed sed -i "s/tag: .*/tag: ${{ gitea.sha }}/g" charts/slashroot/values.yaml @@ -49,7 +59,9 @@ jobs: git config user.name "Gitea Actions Bot" git config user.email "actions@gitea.local" - # 3. Commit and push the updated values.yaml back to the main branch - git add charts/slashroot/values.yaml - git commit -m "chore: update slashroot image tag to ${{ gitea.sha }} [skip ci]" - git push + # Commit and Push back to the Infra Repo + git add . + git commit -m "BOT: (bump) slashroot-cc update: ${{ gitea.sha }}" + + # Push the changes (The token we provided earlier handles authentication) + git push origin main