mirror of
https://github.com/meysamhadeli/booking-microservices.git
synced 2026-04-21 11:47:54 +08:00
.
This commit is contained in:
parent
75afd0d062
commit
4801804a25
23
.github/workflows/build-publish-docker.yml
vendored
23
.github/workflows/build-publish-docker.yml
vendored
@ -15,12 +15,27 @@ jobs:
|
|||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Semantic Release
|
- name: Setup Node.js
|
||||||
uses: semantic-release/git-semantic-release-action@v3
|
uses: actions/setup-node@v2
|
||||||
|
with:
|
||||||
|
node-version: 'lts/*'
|
||||||
|
|
||||||
|
- name: Semantic Release Version
|
||||||
|
id: semantic-version
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
# because of using none default (conventionalcommits) `preset` for `semantic-release`, we should add dependency `conventional-changelog-conventionalcommits`
|
||||||
version_variable: 'TAG_NAME'
|
# using dry-run here for preventing publish release note and just calculate version
|
||||||
|
run: npx -p conventional-changelog-conventionalcommits -p @semantic-release/git -p @semantic-release/changelog -p @semantic-release/exec semantic-release --dry-run
|
||||||
|
|
||||||
|
- name: Semantic Release Versions Outputs
|
||||||
|
run: |
|
||||||
|
echo ${{ steps.semantic-version.outputs.semantic_nextRelease_version }}
|
||||||
|
echo ${{ steps.semantic-version.outputs.semantic_nextRelease_channel }}
|
||||||
|
echo ${{ steps.semantic-version.outputs.semantic_nextRelease_gitTag }}
|
||||||
|
echo ${{ steps.semantic-version.outputs.semantic_lastRelease_version }}
|
||||||
|
echo ${{ steps.semantic-version.outputs.semantic_lastRelease_channel }}
|
||||||
|
echo ${{ steps.semantic-version.outputs.semantic_lastRelease_gitTag }}
|
||||||
|
|
||||||
- name: Login to DockerHub
|
- name: Login to DockerHub
|
||||||
uses: docker/login-action@v2
|
uses: docker/login-action@v2
|
||||||
|
|||||||
41
.github/workflows/conventional-commits.yml
vendored
Normal file
41
.github/workflows/conventional-commits.yml
vendored
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
name: Conventional Commits
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
types:
|
||||||
|
- opened
|
||||||
|
- synchronize
|
||||||
|
- reopened
|
||||||
|
- labeled
|
||||||
|
- unlabeled
|
||||||
|
- edited
|
||||||
|
- ready_for_review
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
conventional-commits:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: check-pull-request-conventional-commits
|
||||||
|
uses: amannn/action-semantic-pull-request@v5
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- uses: fuxingloh/multi-labeler@v1
|
||||||
|
name: conventional-commits-pull-request-labeler
|
||||||
|
if: success()
|
||||||
|
with:
|
||||||
|
github-token: ${{secrets.GITHUB_TOKEN}} # optional, default to '${{ github.token }}'
|
||||||
|
config-path: .github/multi-labeler.yml # optional, default to '.github/labeler.yml'
|
||||||
|
|
||||||
|
# https://docs.github.com/en/actions/using-workflows/about-workflows#creating-dependent-jobs
|
||||||
|
# https://docs.github.com/en/actions/using-jobs/using-jobs-in-a-workflow
|
||||||
|
- name: check-conventional-commits-labels
|
||||||
|
uses: docker://agilepathway/pull-request-label-checker:latest
|
||||||
|
if: success()
|
||||||
|
with:
|
||||||
|
any_of : feature,bug,enhancement,deprecated,security,documentation,build,ci/cd,chore,performance,formatting,dependencies
|
||||||
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
Loading…
x
Reference in New Issue
Block a user