Skip to content

Commit 47d1fac

Browse files
committed
chore: update danger workflow version to v2
1 parent 70bd9a4 commit 47d1fac

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

.github/workflows/danger-workflow-tests.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ on:
88
jobs:
99
danger:
1010
uses: ./.github/workflows/danger.yml
11+
with:
12+
_workflow_version: ${{ github.sha }}
1113

1214
test-outputs:
1315
runs-on: ubuntu-latest

.github/workflows/danger.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
# Runs DangerJS with a pre-configured set of rules on a Pull Request.
22
on:
33
workflow_call:
4+
inputs:
5+
_workflow_version:
6+
description: 'Internal: specify github-workflows (this repo) revision to use when checking out scripts.'
7+
type: string
8+
required: false
9+
default: v2 # Note: update when publishing a new version
410
outputs:
511
outcome:
612
description: Whether the Danger run finished successfully. Possible values are success, failure, cancelled, or skipped.
@@ -17,7 +23,7 @@ jobs:
1723
fetch-depth: 0
1824

1925
- name: Download dangerfile.js
20-
run: wget https://raw.githubusercontent.com/getsentry/github-workflows/feat/dangerjs/danger/dangerfile.js -P ${{ runner.temp }}
26+
run: wget https://raw.githubusercontent.com/getsentry/github-workflows/${{ inputs._workflow_version }}/danger/dangerfile.js -P ${{ runner.temp }}
2127

2228
# Using a pre-built docker image in GitHub container registry instaed of NPM to reduce possible attack vectors.
2329
- name: Run DangerJS

0 commit comments

Comments
 (0)