Skip to content

Commit cc23c3d

Browse files
authored
Add relative sha comparison
There is no prior sha in the github event context of the workflow. Using relative SHA notation is not perfect, but functional. It is likely to not be sufficient for multiple updates on one day.
1 parent 58308fd commit cc23c3d

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

.github/workflows/add-doi.yaml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,6 @@ jobs:
1616
- name: Checkout repository
1717
uses: actions/checkout@v2
1818

19-
- name: Dump GitHub context
20-
env:
21-
GITHUB_CONTEXT: ${{ toJson(github.event) }}
22-
run: echo "$GITHUB_CONTEXT"
23-
2419
- name: Get changed files
2520
id: changed-files
2621
uses: actions/github-script@v6
@@ -31,7 +26,7 @@ jobs:
3126
{
3227
owner: context.repo.owner,
3328
repo: context.repo.repo,
34-
base: context.payload.before,
29+
base: `${context.sha}~1`,
3530
head: context.sha,
3631
},
3732
(response) => response.data.files

0 commit comments

Comments
 (0)