mirror of
https://github.com/meysamhadeli/booking-microservices.git
synced 2026-05-05 04:28:49 +08:00
.
This commit is contained in:
parent
b9e22742a3
commit
1349416219
31
.github/workflows/build-publish-docker.yml
vendored
31
.github/workflows/build-publish-docker.yml
vendored
@ -15,15 +15,30 @@ jobs:
|
|||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Extract version numbers
|
|
||||||
|
# https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions
|
||||||
|
- name: Semantic Release Publish
|
||||||
|
id: semantic
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
# because of using none default (conventionalcommits) `preset` for `semantic-release`, we should add dependency `conventional-changelog-conventionalcommits`
|
||||||
|
# run: npx -p conventional-changelog-conventionalcommits -p @semantic-release/git -p @semantic-release/changelog -p @semantic-release/exec semantic-release
|
||||||
|
|
||||||
|
- name: Semantic Release Outputs
|
||||||
run: |
|
run: |
|
||||||
version=$(echo $GITHUB_REF | sed 's/refs\/tags\///')
|
echo ${{ steps.semantic.outputs.semantic_nextRelease_version }}
|
||||||
major=$(echo $version | cut -d'.' -f1 | sed 's/v//')
|
echo ${{ steps.semantic.outputs.semantic_nextRelease_channel }}
|
||||||
minor=$(echo $version | cut -d'.' -f2)
|
echo ${{ steps.semantic.outputs.semantic_nextRelease_gitTag }}
|
||||||
patch=$(echo $version | cut -d'.' -f3)
|
echo ${{ steps.semantic.outputs.semantic_lastRelease_version }}
|
||||||
echo "The major version number is $major"
|
echo ${{ steps.semantic.outputs.semantic_lastRelease_channel }}
|
||||||
echo "The minor version number is $minor"
|
echo ${{ steps.semantic.outputs.semantic_lastRelease_gitTag }}
|
||||||
echo "The patch version number is $patch"
|
|
||||||
|
#
|
||||||
|
# - name: Get release tag
|
||||||
|
# run: echo "::set-output name=tag::$(echo $GITHUB_REF)"
|
||||||
|
#
|
||||||
|
# - name: Print release tag
|
||||||
|
# run: echo "The release tag is ${{ steps.get_tag.outputs.tag }}"
|
||||||
|
|
||||||
- name: Login to DockerHub
|
- name: Login to DockerHub
|
||||||
uses: docker/login-action@v2
|
uses: docker/login-action@v2
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user