Skip to content

Commit 03e13cb

Browse files
authored
[actions] update sandpaper workflow to version 0.16.3
1 parent ac6816d commit 03e13cb

9 files changed

+32
-22
lines changed

.github/workflows/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ are okay.
9696

9797
This update is run ~~weekly or~~ on demand.
9898

99-
### 03 Maintain: Update Pacakge Cache (update-cache.yaml)
99+
### 03 Maintain: Update Package Cache (update-cache.yaml)
100100

101101
For lessons that have generated content, we use {renv} to ensure that the output
102102
is stable. This is controlled by a single lockfile which documents the packages

.github/workflows/pr-close-signal.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ jobs:
1616
mkdir -p ./pr
1717
printf ${{ github.event.number }} > ./pr/NUM
1818
- name: Upload Diff
19-
uses: actions/upload-artifact@v2
19+
uses: actions/upload-artifact@v3
2020
with:
21-
name: pr
21+
name: pr
2222
path: ./pr
2323

.github/workflows/pr-comment.yaml

+12-6
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ jobs:
2121
test-pr:
2222
name: "Test if pull request is valid"
2323
runs-on: ubuntu-latest
24-
if: >
25-
github.event.workflow_run.event == 'pull_request' &&
24+
if: >
25+
github.event.workflow_run.event == 'pull_request' &&
2626
github.event.workflow_run.conclusion == 'success'
2727
outputs:
2828
is_valid: ${{ steps.check-pr.outputs.VALID }}
@@ -78,6 +78,8 @@ jobs:
7878
if: ${{ needs.test-pr.outputs.is_valid == 'true' }}
7979
env:
8080
NR: ${{ needs.test-pr.outputs.number }}
81+
permissions:
82+
contents: write
8183
steps:
8284
- name: 'Checkout md outputs'
8385
uses: actions/checkout@v3
@@ -104,9 +106,9 @@ jobs:
104106
git config --local user.name "GitHub Actions"
105107
CURR_HEAD=$(git rev-parse HEAD)
106108
git checkout --orphan md-outputs-PR-${NR}
107-
git add -A
109+
git add -A
108110
git commit -m "source commit: ${CURR_HEAD}"
109-
ls -A | grep -v '^.git$' | xargs rm -r
111+
ls -A | grep -v '^.git$' | xargs -I _ rm -r '_'
110112
cd ..
111113
unzip -o -d built built.zip
112114
cd built
@@ -122,14 +124,16 @@ jobs:
122124
if: ${{ needs.test-pr.outputs.is_valid == 'true' }}
123125
env:
124126
NR: ${{ needs.test-pr.outputs.number }}
127+
permissions:
128+
pull-requests: write
125129
steps:
126130
- name: 'Download comment artifact'
127131
id: dl
128132
uses: carpentries/actions/download-workflow-artifact@main
129133
with:
130134
run: ${{ github.event.workflow_run.id }}
131135
name: 'diff'
132-
136+
133137
- if: ${{ steps.dl.outputs.success == 'true' }}
134138
run: unzip ${{ github.workspace }}/diff.zip
135139

@@ -138,7 +142,7 @@ jobs:
138142
if: ${{ steps.dl.outputs.success == 'true' }}
139143
uses: carpentries/actions/comment-diff@main
140144
with:
141-
pr: ${{ env.NR }}
145+
pr: ${{ env.NR }}
142146
path: ${{ github.workspace }}/diff.md
143147

144148
# Comment if the PR is open and matches the SHA, but the workflow files have
@@ -151,6 +155,8 @@ jobs:
151155
env:
152156
NR: ${{ github.event.workflow_run.pull_requests[0].number }}
153157
body: ${{ needs.test-pr.outputs.msg }}
158+
permissions:
159+
pull-requests: write
154160
steps:
155161
- name: 'Check for spoofing'
156162
id: dl

.github/workflows/pr-post-remove-branch.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ jobs:
1313
if: >
1414
github.event.workflow_run.event == 'pull_request' &&
1515
github.event.workflow_run.conclusion == 'success'
16+
permissions:
17+
contents: write
1618
steps:
1719
- name: 'Download artifact'
1820
uses: carpentries/actions/download-workflow-artifact@main

.github/workflows/pr-preflight.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ jobs:
1414
runs-on: ubuntu-latest
1515
outputs:
1616
is_valid: ${{ steps.check-pr.outputs.VALID }}
17+
permissions:
18+
pull-requests: write
1719
steps:
1820
- name: "Get Invalid Hashes File"
1921
id: hash

.github/workflows/pr-receive.yaml

+5-5
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
- name: "Upload PR number"
2626
id: upload
2727
if: ${{ always() }}
28-
uses: actions/upload-artifact@v2
28+
uses: actions/upload-artifact@v3
2929
with:
3030
name: pr
3131
path: ${{ github.workspace }}/NR
@@ -107,20 +107,20 @@ jobs:
107107
shell: Rscript {0}
108108

109109
- name: "Upload PR"
110-
uses: actions/upload-artifact@v2
110+
uses: actions/upload-artifact@v3
111111
with:
112112
name: pr
113113
path: ${{ env.PR }}
114114

115115
- name: "Upload Diff"
116-
uses: actions/upload-artifact@v2
116+
uses: actions/upload-artifact@v3
117117
with:
118118
name: diff
119119
path: ${{ env.CHIVE }}
120120
retention-days: 1
121-
121+
122122
- name: "Upload Build"
123-
uses: actions/upload-artifact@v2
123+
uses: actions/upload-artifact@v3
124124
with:
125125
name: built
126126
path: ${{ env.MD }}
+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.11.5
1+
0.16.3

.github/workflows/update-cache.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ jobs:
9393
- name: Create Pull Request
9494
id: cpr
9595
if: ${{ steps.update.outputs.n > 0 }}
96-
uses: peter-evans/create-pull-request@v4.2.0
96+
uses: carpentries/create-pull-request@main
9797
with:
9898
token: ${{ secrets.SANDPAPER_WORKFLOW }}
9999
delete-branch: true
@@ -119,7 +119,7 @@ jobs:
119119
```
120120
121121
- Auto-generated by [create-pull-request][1] on ${{ steps.update.outputs.date }}
122-
123-
[1]: https://github.com/peter-evans/create-pull-request
122+
123+
[1]: https://github.com/carpentries/create-pull-request/tree/main
124124
labels: "type: package cache"
125125
draft: false

.github/workflows/update-workflows.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@ jobs:
4343
uses: carpentries/actions/update-workflows@main
4444
with:
4545
clean: ${{ github.event.inputs.clean }}
46-
46+
4747
- name: Create Pull Request
4848
id: cpr
4949
if: "${{ steps.update.outputs.new }}"
50-
uses: peter-evans/create-pull-request@v4.2.0
50+
uses: carpentries/create-pull-request@main
5151
with:
5252
token: ${{ secrets.SANDPAPER_WORKFLOW }}
5353
delete-branch: true
@@ -60,7 +60,7 @@ jobs:
6060
Update Workflows from sandpaper version ${{ steps.update.outputs.old }} -> ${{ steps.update.outputs.new }}
6161
6262
- Auto-generated by [create-pull-request][1] on ${{ steps.update.outputs.date }}
63-
64-
[1]: https://github.com/peter-evans/create-pull-request
63+
64+
[1]: https://github.com/carpentries/create-pull-request/tree/main
6565
labels: "type: template and tools"
6666
draft: false

0 commit comments

Comments
 (0)