Skip to content

Commit 95505d2

Browse files
authored
ci: Fix workflow events (#106)
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
1 parent 111cbec commit 95505d2

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

.github/workflows/release-please.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,10 @@ jobs:
2121
monorepo-tags: true
2222

2323
- name: Checkout code
24+
uses: actions/checkout@v4
25+
with:
26+
ref: refs/tags/${{ steps.release.outputs.tag_name }}
2427
if: steps.release.outputs.releases_created
25-
uses: actions/checkout@v2
2628

2729
- name: Setup Node.js
2830
if: steps.release.outputs.releases_created

.github/workflows/test.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ on:
33
pull_request:
44
types: [opened, synchronize, reopened]
55

6+
concurrency:
7+
group: ${{ github.workflow }}-${{ github.event.number }}
8+
cancel-in-progress: true
9+
610
jobs:
711
build:
812
name: ${{ matrix.os }}, Node.js ${{ matrix.node-version }}
@@ -23,6 +27,8 @@ jobs:
2327

2428
- name: Checkout code
2529
uses: actions/checkout@v4
30+
with:
31+
ref: ${{ github.ref }}
2632

2733
- name: Setup Node.js ${{ matrix.node-version }}
2834
uses: actions/setup-node@v4

0 commit comments

Comments
 (0)