diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index db3c01600..a3aa44f98 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -85,7 +85,7 @@ jobs: PR_TITLE: ${{ format('Direct push to {0}', github.ref_name) }} call-workflow-e2e-prod: - if: ${{ !contains(github.event.head_commit.message, '[skip ci]') }} + if: ${{ !contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[skip release]')}} needs: [build, lint, test, setup-matrix] uses: dhis2/workflows/.github/workflows/analytics-e2e-tests-prod.yml@master with: @@ -102,7 +102,11 @@ jobs: release: runs-on: ubuntu-latest needs: call-workflow-e2e-prod - if: ${{ !github.event.push.repository.fork && github.actor != 'dependabot[bot]' }} + if: > + ${{ !github.event.push.repository.fork && + github.actor != 'dependabot[bot]' && + !contains(github.event.head_commit.message, '[skip ci]') && + !contains(github.event.head_commit.message, '[skip release]') }} steps: - uses: actions/checkout@v3 with: @@ -115,6 +119,7 @@ jobs: - name: Install run: yarn install --frozen-lockfile + # This step will push a new commit to master with [skip release] in the commit message - name: Run Semantic Release run: npx semantic-release env: @@ -125,7 +130,12 @@ jobs: report-release-result: runs-on: ubuntu-latest - needs: call-workflow-e2e-prod + needs: release + if: > + ${{ !github.event.push.repository.fork && + github.actor != 'dependabot[bot]' && + !contains(github.event.head_commit.message, '[skip ci]') && + !contains(github.event.head_commit.message, '[skip release]') }} steps: - name: Checkout code uses: actions/checkout@master