Skip to content

Commit

Permalink
breaking git push action out into separate step
Browse files Browse the repository at this point in the history
Signed-off-by: Jeremy J. Miller <jeremymv2@users.noreply.github.com>
  • Loading branch information
jeremymv2 committed Sep 22, 2023
1 parent 683ae82 commit 2703190
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,13 @@ jobs:
skip-commit: 'true'
skip-tag: 'true'
skip-push: 'true'
token: ${{ secrets.GH_TOKEN }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PACKAGEJSON_DIR: 'cmd'
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git commit -am 'CI(version) ${{ steps.version-bump-app.outputs.newTag }}'
git tag ${{ steps.version-bump-app.outputs.newTag }}
git push origin main ${{ steps.version-bump-app.outputs.newTag }}
- name: New Version Output
env:
NEW_TAG: ${{ steps.version-bump-app.outputs.newTag }}
run: echo "New version $NEW_TAG"
- name: Retrieve Docker Image Name with Tag
run: |
echo "::set-output name=IMG_NAME_AND_TAG::$(make docker_img_name_and_tag)"
Expand All @@ -76,3 +73,14 @@ jobs:
context: .
push: true
tags: ${{ steps.img_name_and_version_tag.outputs.IMG_NAME_AND_TAG }}
- name: Commit Files
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git commit -am 'CI(version) ${{ steps.version-bump-app.outputs.newTag }}'
git tag ${{ steps.version-bump-app.outputs.newTag }}
- name: Push Changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GH_TOKEN }}
tags: true

0 comments on commit 2703190

Please sign in to comment.