Skip to content

Commit 21f3d65

Browse files
authored
Automatic deploy (MAJOR) (#42)
* test semver * Update (MINOR) * chore(): Use new semver without commit * chore(): Remove test file
1 parent 41b0778 commit 21f3d65

1 file changed

Lines changed: 5 additions & 13 deletions

File tree

.github/workflows/deploy-docker.yml

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,23 +21,15 @@ jobs:
2121
with:
2222
ref: ${{ github.ref }}
2323
submodules: true
24+
fetch-depth: 0
2425

25-
- name: Automated Version Bump # This action step reads and updates the version number acc to commit message
26+
- name: Git Semantic Version
2627
id: version-bump
27-
uses: 'phips28/gh-action-bump-version@master'
28-
env:
29-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30-
with:
31-
major-wording: 'MAJOR'
32-
minor-wording: 'MINOR'
33-
patch-wording: 'patch,feature,bugfix'
34-
skip-commit: ${{ github.ref != 'refs/heads/main' }}
35-
skip-push: ${{ github.ref != 'refs/heads/main' }}
36-
skip-tag: ${{ github.ref != 'refs/heads/main' }}
28+
uses: PaulHatch/semantic-version@v5.0.0-alpha2
3729

3830
- name: Output Step # Optional: Prints the new version
3931
env:
40-
NEW_TAG: ${{ steps.version-bump.outputs.newTag }}
32+
NEW_TAG: ${{ steps.version-bump.outputs.version }}
4133
run: echo "new tag $NEW_TAG"
4234

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

0 commit comments

Comments
 (0)