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 <roman@dragonflydb.io>
This commit is contained in:
Roman Gershman 2022-07-06 12:55:10 +03:00 committed by GitHub
parent 080203ec21
commit 567af06d2c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 1 deletions

View File

@ -35,6 +35,8 @@ jobs:
- name: checkout - name: checkout
uses: actions/checkout@v3 uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: dsaltares/fetch-gh-release-asset@master - uses: dsaltares/fetch-gh-release-asset@master
with: with:
@ -115,6 +117,7 @@ jobs:
- name: Update helm chart - name: Update helm chart
if: env.IS_PRERELEASE != 'true' if: env.IS_PRERELEASE != 'true'
run: | run: |
git checkout main
sed -Ei \ sed -Ei \
-e 's/^(version\:) .*/\1 '${{ env.TAG_NAME }}'/g' \ -e 's/^(version\:) .*/\1 '${{ env.TAG_NAME }}'/g' \
-e 's/^(appVersion\:) .*/\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 }}' \ -m 'chore(helm-chart): update to ${{ env.TAG_NAME }}' \
contrib/charts/dragonfly/Chart.yaml contrib/charts/dragonfly/Chart.yaml
git push - name: GitHub Push
uses: CasperWA/push-protected@v2
with:
token: ${{ secrets.DRAGONFLY_TOKEN }}
branch: main