From f5013ad88907a3096e89483b95984a2216220246 Mon Sep 17 00:00:00 2001 From: Antonio Lain <135073478+antlai-temporal@users.noreply.github.com> Date: Wed, 12 Jun 2024 14:28:39 -0500 Subject: [PATCH] Publish only non-RC releases (#594) --- .github/workflows/trigger-publish.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/trigger-publish.yml b/.github/workflows/trigger-publish.yml index dc7c64c4..04eee319 100644 --- a/.github/workflows/trigger-publish.yml +++ b/.github/workflows/trigger-publish.yml @@ -7,6 +7,7 @@ on: jobs: trigger: + if: ${{ ! contains(github.ref, '-rc.') }} name: 'trigger Docker image build' runs-on: ubuntu-latest @@ -15,11 +16,6 @@ jobs: shell: bash steps: - - name: Get git branch name - id: get_branch - run: | - echo branch="${GITHUB_REF#refs/heads/}" >> "$GITHUB_OUTPUT" - - name: Generate a token id: generate_token uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92 @@ -34,7 +30,7 @@ jobs: PARENT_BRANCH: ${{ toJSON('main') }} WORKFLOW_ID: update-submodules.yml REPO: ${{ toJSON('cli') }} - BRANCH: ${{ toJSON(steps.get_branch.outputs.branch) }} + BRANCH: ${{ toJSON('main') }} COMMIT: ${{ toJSON(github.sha) }} run: | curl -fL -X POST -H "Accept: application/vnd.github.v3+json" -H "Authorization: token $PAT" "https://api.github.com/repos/$PARENT_REPO/actions/workflows/$WORKFLOW_ID/dispatches" -d '{"ref":'"$PARENT_BRANCH"', "inputs": { "repo":'"$REPO"', "branch":'"$BRANCH"', "commit": '"$COMMIT"' }}'