From 567af06d2cccc72e1833bcb1a5ad89f598c00f16 Mon Sep 17 00:00:00 2001 From: Roman Gershman Date: Wed, 6 Jul 2022 12:55:10 +0300 Subject: [PATCH] fix(action): switch git push to dedicated action (#192) Docker release pipeline can not push to protected main branch using the service token. This switches to PAT secret. Signed-off-by: Roman Gershman --- .github/workflows/docker-release.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker-release.yml b/.github/workflows/docker-release.yml index f866362f8..4df3d9480 100644 --- a/.github/workflows/docker-release.yml +++ b/.github/workflows/docker-release.yml @@ -35,6 +35,8 @@ jobs: - name: checkout uses: actions/checkout@v3 + with: + fetch-depth: 0 - uses: dsaltares/fetch-gh-release-asset@master with: @@ -115,6 +117,7 @@ jobs: - name: Update helm chart if: env.IS_PRERELEASE != 'true' run: | + git checkout main sed -Ei \ -e 's/^(version\:) .*/\1 '${{ env.TAG_NAME }}'/g' \ -e 's/^(appVersion\:) .*/\1 "'${{ env.TAG_NAME }}'"/g' \ @@ -124,4 +127,8 @@ jobs: -m 'chore(helm-chart): update to ${{ env.TAG_NAME }}' \ contrib/charts/dragonfly/Chart.yaml - git push + - name: GitHub Push + uses: CasperWA/push-protected@v2 + with: + token: ${{ secrets.DRAGONFLY_TOKEN }} + branch: main \ No newline at end of file