diff --git a/.github/workflows/.reusable-docker-build-and-push.yml b/.github/workflows/.reusable-docker-build-and-push.yml index e2709a6..eafc521 100644 --- a/.github/workflows/.reusable-docker-build-and-push.yml +++ b/.github/workflows/.reusable-docker-build-and-push.yml @@ -175,8 +175,8 @@ jobs: type=sha # full length sha type=sha,format=long - # SemVer human readable version - type=raw,value=${{ env.SEMVER_VERSION }} + # SemVer human readable version for default branch + type=raw,value=${{ env.SEMVER_VERSION }},enable=${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }} # set latest tag for default branch # https://github.com/docker/metadata-action/issues/171 explains how to tag latest only on default branch type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }} diff --git a/.github/workflows/calculate-tests-coverage-on-pull-request.yml b/.github/workflows/calculate-tests-coverage-on-pull-request.yml index 1d2dd40..38e2fd5 100644 --- a/.github/workflows/calculate-tests-coverage-on-pull-request.yml +++ b/.github/workflows/calculate-tests-coverage-on-pull-request.yml @@ -256,10 +256,13 @@ jobs: git config user.email "contact@tourmalinecore.com" git config user.name "Workflow Action" - git commit README.md -m "docs(readme): bring test coverage score up to date" || echo "No changes to commit" + if ! git commit README.md -m "docs(readme): bring test coverage score up to date"; then + echo "No changes to commit." + exit 0 + fi # these fetch and rebase were needed to address an issue when there are 2 or more parallel jobs which modify README.md # these jobs are doing it concurrently and there were a race condition, only the first modifier could push its changes git fetch origin ${{ github.head_ref }} git rebase origin/${{ github.head_ref }} - git push origin HEAD:${{ github.head_ref }} || echo "No changes to commit" + git push origin HEAD:${{ github.head_ref }} diff --git a/.github/workflows/db-diagram-generation-on-pull-request.yml b/.github/workflows/db-diagram-generation-on-pull-request.yml index ec7303b..b6389ce 100644 --- a/.github/workflows/db-diagram-generation-on-pull-request.yml +++ b/.github/workflows/db-diagram-generation-on-pull-request.yml @@ -46,10 +46,13 @@ jobs: git config user.email "contact@tourmalinecore.com" git config user.name "Workflow Action" - git commit README.md -m "docs(readme): Update Mermaid DB Schema Diagram in README.md (siren-gen)" || echo "No changes to commit" + if ! git commit README.md -m "docs(readme): Update Mermaid DB Schema Diagram in README.md (siren-gen)"; then + echo "No changes to commit." + exit 0 + fi # these fetch and rebase were needed to address an issue when there are 2 or more parallel jobs which modify README.md # these jobs are doing it concurrently and there were a race condition, only the first modifier could push its changes git fetch origin ${{ github.head_ref }} git rebase origin/${{ github.head_ref }} - git push origin HEAD:${{ github.head_ref }} || echo "No changes to commit" + git push origin HEAD:${{ github.head_ref }} diff --git a/.github/workflows/publish-js-client-npm-package.yml b/.github/workflows/publish-js-client-npm-package.yml index aa081f9..aa918de 100644 --- a/.github/workflows/publish-js-client-npm-package.yml +++ b/.github/workflows/publish-js-client-npm-package.yml @@ -92,8 +92,11 @@ jobs: # we don't need to commit these files with always changing version # that will allow us to not reset installed packages cache on these files change git restore js-client/package.json js-client/package-lock.json - - git commit -m "chore(js-client): Update js-client by OpenAPI" || echo "No changes to commit" + + if ! git commit -m "chore(js-client): Update js-client by OpenAPI"; then + echo "No changes to commit." + exit 0 + fi # these fetch and rebase were needed to address an issue when there are 2 or more parallel jobs which commit # these jobs are doing it concurrently and there were a race condition, only the first modifier could push its changes @@ -101,4 +104,4 @@ jobs: # and in case of commits to master ref_name is what we need and head_ref is empty git fetch origin ${{ github.head_ref || github.ref_name }} git rebase origin/${{ github.head_ref || github.ref_name }} - git push origin HEAD:${{ github.head_ref || github.ref_name }} || echo "No changes to commit" + git push origin HEAD:${{ github.head_ref || github.ref_name }}