From 085765333851b8aa99625521a47d1dd663b9bed4 Mon Sep 17 00:00:00 2001 From: Joey Parrish Date: Tue, 5 Nov 2024 14:34:47 -0800 Subject: [PATCH] ci: Fix workflow events (#1446) This was found by auditing workflows based on research published here: https://github.com/joeyparrish/workflow-cheat-sheet The research was prompted by a workflow bug in Shaka Streamer --- .github/workflows/pr.yaml | 2 +- .github/workflows/release-please.yaml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 0c991ad87f..96ecd6c18e 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -26,7 +26,7 @@ on: # old one. If a PR is updated and a new test run is started, the old test run # will be cancelled automatically to conserve resources. concurrency: - group: ${{ github.workflow }}-${{ inputs.ref || github.ref }} + group: ${{ github.workflow }}-${{ github.event.number || inputs.ref }} cancel-in-progress: true jobs: diff --git a/.github/workflows/release-please.yaml b/.github/workflows/release-please.yaml index 9c55857de7..e426ff69e8 100644 --- a/.github/workflows/release-please.yaml +++ b/.github/workflows/release-please.yaml @@ -82,7 +82,7 @@ jobs: if: needs.release.outputs.release_created && needs.compute.outputs.latest uses: ./.github/workflows/publish-docs.yaml with: - ref: ${{ github.ref }} + ref: refs/tags/${{ needs.release.outputs.tag_name }} # Publish official docker image docker: @@ -105,7 +105,7 @@ jobs: if: needs.release.outputs.release_created uses: ./.github/workflows/build.yaml with: - ref: ${{ github.ref }} + ref: refs/tags/${{ needs.release.outputs.tag_name }} self_hosted: ${{ needs.settings.outputs.self_hosted != '' }} debug: ${{ needs.settings.outputs.debug != '' }}