Skip to content

Commit

Permalink
Automatic deploy (MAJOR) (#42)
Browse files Browse the repository at this point in the history
* test semver

* Update (MINOR)

* chore(): Use new semver without commit

* chore(): Remove test file
  • Loading branch information
Samox authored Jul 8, 2022
1 parent 41b0778 commit 21f3d65
Showing 1 changed file with 5 additions and 13 deletions.
18 changes: 5 additions & 13 deletions .github/workflows/deploy-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,15 @@ jobs:
with:
ref: ${{ github.ref }}
submodules: true
fetch-depth: 0

- name: Automated Version Bump # This action step reads and updates the version number acc to commit message
- name: Git Semantic Version
id: version-bump
uses: 'phips28/gh-action-bump-version@master'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
major-wording: 'MAJOR'
minor-wording: 'MINOR'
patch-wording: 'patch,feature,bugfix'
skip-commit: ${{ github.ref != 'refs/heads/main' }}
skip-push: ${{ github.ref != 'refs/heads/main' }}
skip-tag: ${{ github.ref != 'refs/heads/main' }}
uses: PaulHatch/[email protected]

- name: Output Step # Optional: Prints the new version
env:
NEW_TAG: ${{ steps.version-bump.outputs.newTag }}
NEW_TAG: ${{ steps.version-bump.outputs.version }}
run: echo "new tag $NEW_TAG"

- name: Log into registry ${{ env.REGISTRY }} # Log into the container registry from GitHub runner
Expand All @@ -52,5 +44,5 @@ jobs:
with:
context: ./ # Folder where the Dockerfile resides, use `/` if in root path
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ env.IMAGE_NAME }}:latest, ${{ env.IMAGE_NAME }}:${{ steps.version-bump.outputs.newTag }}
tags: ${{ env.IMAGE_NAME }}:latest, ${{ env.IMAGE_NAME }}:${{ steps.version-bump.outputs.version }}
# Pushed the image with `latest` tag and the new semantic version obtained from the version-bump step

0 comments on commit 21f3d65

Please sign in to comment.