Skip to content

Commit

Permalink
moving bump commit and push tag to same 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 3591755 commit 683ae82
Showing 1 changed file with 8 additions and 14 deletions.
22 changes: 8 additions & 14 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,16 @@ jobs:
skip-commit: 'true'
skip-tag: 'true'
skip-push: 'true'
token: ${{ secrets.GH_TOKEN }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PACKAGEJSON_DIR: 'cmd'
- name: New Version Output
env:
NEW_TAG: ${{ steps.version-bump-app.outputs.newTag }}
run: echo "New version $NEW_TAG"
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: Retrieve Docker Image Name with Tag
run: |
echo "::set-output name=IMG_NAME_AND_TAG::$(make docker_img_name_and_tag)"
Expand All @@ -67,18 +70,9 @@ jobs:
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
- name: Build and publish Image
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ steps.img_name_and_version_tag.outputs.IMG_NAME_AND_TAG }}
- name: Commit Files
with:
token: ${{ secrets.GH_TOKEN }}
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 }}

0 comments on commit 683ae82

Please sign in to comment.