Skip to content

Commit 26079f9

Browse files
authored
Merge pull request #3 from LibraryCarpentry/1-failed-build
fix workflow files
2 parents ba9037f + 39da679 commit 26079f9

File tree

10 files changed

+35
-34
lines changed

10 files changed

+35
-34
lines changed

.github/workflows/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
This directory contains workflows to be used for Lessons using the {sandpaper}
44
lesson infrastructure. Two of these workflows require R (`sandpaper-main.yaml`
5-
and `pr-receive.yaml`) and the rest are bots to handle pull request management.
5+
and `pr-recieve.yaml`) and the rest are bots to handle pull request management.
66

77
These workflows will likely change as {sandpaper} evolves, so it is important to
88
keep them up-to-date. To do this in your lesson you can do the following in your
@@ -94,9 +94,9 @@ branch called `update/workflows` and a pull request is created. Maintainers are
9494
encouraged to review the changes and accept the pull request if the outputs
9595
are okay.
9696

97-
This update is run weekly or on demand.
97+
This update is run ~~weekly or~~ on demand.
9898

99-
### 03 Maintain: Update Package Cache (update-cache.yaml)
99+
### 03 Maintain: Update Pacakge 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
@@ -140,7 +140,7 @@ Once the checks are finished, a comment is issued to the pull request, which
140140
will allow maintainers to determine if it is safe to run the
141141
"Receive Pull Request" workflow from new contributors.
142142

143-
### Receive Pull Request (pr-receive.yaml)
143+
### Recieve Pull Request (pr-recieve.yaml)
144144

145145
**Note of caution:** This workflow runs arbitrary code by anyone who creates a
146146
pull request. GitHub has safeguarded the token used in this workflow to have no
@@ -171,7 +171,7 @@ The artifacts produced are used by the next workflow.
171171

172172
### Comment on Pull Request (pr-comment.yaml)
173173

174-
This workflow is triggered if the `pr-receive.yaml` workflow is successful.
174+
This workflow is triggered if the `pr-recieve.yaml` workflow is successful.
175175
The steps in this workflow are:
176176

177177
1. Test if the workflow is valid and comment the validity of the workflow to the

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,16 @@ on:
88
jobs:
99
send-close-signal:
1010
name: "Send closing signal"
11-
runs-on: ubuntu-22.04
11+
runs-on: ubuntu-latest
1212
if: ${{ github.event.action == 'closed' }}
1313
steps:
1414
- name: "Create PRtifact"
1515
run: |
1616
mkdir -p ./pr
1717
printf ${{ github.event.number }} > ./pr/NUM
1818
- name: Upload Diff
19-
uses: actions/upload-artifact@v4
19+
uses: actions/upload-artifact@v3
2020
with:
2121
name: pr
2222
path: ./pr
23+

.github/workflows/pr-comment.yaml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
# - no .github files were committed
2121
test-pr:
2222
name: "Test if pull request is valid"
23-
runs-on: ubuntu-22.04
23+
runs-on: ubuntu-latest
2424
if: >
2525
github.event.workflow_run.event == 'pull_request' &&
2626
github.event.workflow_run.conclusion == 'success'
@@ -74,15 +74,15 @@ jobs:
7474
create-branch:
7575
name: "Create Git Branch"
7676
needs: test-pr
77-
runs-on: ubuntu-22.04
77+
runs-on: ubuntu-latest
7878
if: ${{ needs.test-pr.outputs.is_valid == 'true' }}
7979
env:
8080
NR: ${{ needs.test-pr.outputs.number }}
8181
permissions:
8282
contents: write
8383
steps:
8484
- name: 'Checkout md outputs'
85-
uses: actions/checkout@v4
85+
uses: actions/checkout@v3
8686
with:
8787
ref: md-outputs
8888
path: built
@@ -120,7 +120,7 @@ jobs:
120120
comment-pr:
121121
name: "Comment on Pull Request"
122122
needs: [test-pr, create-branch]
123-
runs-on: ubuntu-22.04
123+
runs-on: ubuntu-latest
124124
if: ${{ needs.test-pr.outputs.is_valid == 'true' }}
125125
env:
126126
NR: ${{ needs.test-pr.outputs.number }}
@@ -150,7 +150,7 @@ jobs:
150150
comment-changed-workflow:
151151
name: "Comment if workflow files have changed"
152152
needs: test-pr
153-
runs-on: ubuntu-22.04
153+
runs-on: ubuntu-latest
154154
if: ${{ always() && needs.test-pr.outputs.is_valid == 'false' }}
155155
env:
156156
NR: ${{ github.event.workflow_run.pull_requests[0].number }}
@@ -182,3 +182,4 @@ jobs:
182182
with:
183183
pr: ${{ env.NR }}
184184
body: ${{ env.body }}
185+

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
jobs:
1010
delete:
1111
name: "Delete branch from Pull Request"
12-
runs-on: ubuntu-22.04
12+
runs-on: ubuntu-latest
1313
if: >
1414
github.event.workflow_run.event == 'pull_request' &&
1515
github.event.workflow_run.conclusion == 'success'

.github/workflows/pr-preflight.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
test-pr:
1212
name: "Test if pull request is valid"
1313
if: ${{ github.event.action != 'closed' }}
14-
runs-on: ubuntu-22.04
14+
runs-on: ubuntu-latest
1515
outputs:
1616
is_valid: ${{ steps.check-pr.outputs.VALID }}
1717
permissions:

.github/workflows/pr-receive.yaml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
test-pr:
1414
name: "Record PR number"
1515
if: ${{ github.event.action != 'closed' }}
16-
runs-on: ubuntu-22.04
16+
runs-on: ubuntu-latest
1717
outputs:
1818
is_valid: ${{ steps.check-pr.outputs.VALID }}
1919
steps:
@@ -25,7 +25,7 @@ jobs:
2525
- name: "Upload PR number"
2626
id: upload
2727
if: ${{ always() }}
28-
uses: actions/upload-artifact@v4
28+
uses: actions/upload-artifact@v3
2929
with:
3030
name: pr
3131
path: ${{ github.workspace }}/NR
@@ -48,7 +48,7 @@ jobs:
4848
build-md-source:
4949
name: "Build markdown source files if valid"
5050
needs: test-pr
51-
runs-on: ubuntu-22.04
51+
runs-on: ubuntu-latest
5252
if: ${{ needs.test-pr.outputs.is_valid == 'true' }}
5353
env:
5454
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
@@ -58,10 +58,10 @@ jobs:
5858
MD: ${{ github.workspace }}/site/built
5959
steps:
6060
- name: "Check Out Main Branch"
61-
uses: actions/checkout@v4
61+
uses: actions/checkout@v3
6262

6363
- name: "Check Out Staging Branch"
64-
uses: actions/checkout@v4
64+
uses: actions/checkout@v3
6565
with:
6666
ref: md-outputs
6767
path: ${{ env.MD }}
@@ -107,21 +107,20 @@ jobs:
107107
shell: Rscript {0}
108108

109109
- name: "Upload PR"
110-
uses: actions/upload-artifact@v4
110+
uses: actions/upload-artifact@v3
111111
with:
112112
name: pr
113113
path: ${{ env.PR }}
114-
overwrite: true
115114

116115
- name: "Upload Diff"
117-
uses: actions/upload-artifact@v4
116+
uses: actions/upload-artifact@v3
118117
with:
119118
name: diff
120119
path: ${{ env.CHIVE }}
121120
retention-days: 1
122121

123122
- name: "Upload Build"
124-
uses: actions/upload-artifact@v4
123+
uses: actions/upload-artifact@v3
125124
with:
126125
name: built
127126
path: ${{ env.MD }}

.github/workflows/sandpaper-main.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,4 @@ jobs:
6161
reset <- "${{ github.event.inputs.reset }}" == "true"
6262
sandpaper::package_cache_trigger(TRUE)
6363
sandpaper:::ci_deploy(reset = reset)
64-
shell: Rscript {0}
64+
shell: Rscript {0}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.16.10
1+
0.11.12

.github/workflows/update-cache.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ on:
1414
jobs:
1515
preflight:
1616
name: "Preflight Check"
17-
runs-on: ubuntu-22.04
17+
runs-on: ubuntu-latest
1818
outputs:
1919
ok: ${{ steps.check.outputs.ok }}
2020
steps:
@@ -36,14 +36,14 @@ jobs:
3636
3737
check_renv:
3838
name: "Check if We Need {renv}"
39-
runs-on: ubuntu-22.04
39+
runs-on: ubuntu-latest
4040
needs: preflight
4141
if: ${{ needs.preflight.outputs.ok == 'true'}}
4242
outputs:
4343
needed: ${{ steps.renv.outputs.exists }}
4444
steps:
4545
- name: "Checkout Lesson"
46-
uses: actions/checkout@v4
46+
uses: actions/checkout@v3
4747
- id: renv
4848
run: |
4949
if [[ -d renv ]]; then
@@ -52,7 +52,7 @@ jobs:
5252
5353
check_token:
5454
name: "Check SANDPAPER_WORKFLOW token"
55-
runs-on: ubuntu-22.04
55+
runs-on: ubuntu-latest
5656
needs: check_renv
5757
if: ${{ needs.check_renv.outputs.needed == 'true' }}
5858
outputs:
@@ -69,14 +69,14 @@ jobs:
6969
name: "Update Package Cache"
7070
needs: check_token
7171
if: ${{ needs.check_token.outputs.repo== 'true' }}
72-
runs-on: ubuntu-22.04
72+
runs-on: ubuntu-latest
7373
env:
7474
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
7575
RENV_PATHS_ROOT: ~/.local/share/renv/
7676
steps:
7777

7878
- name: "Checkout Lesson"
79-
uses: actions/checkout@v4
79+
uses: actions/checkout@v3
8080

8181
- name: "Set up R"
8282
uses: r-lib/actions/setup-r@v2

.github/workflows/update-workflows.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ on:
1818
jobs:
1919
check_token:
2020
name: "Check SANDPAPER_WORKFLOW token"
21-
runs-on: ubuntu-22.04
21+
runs-on: ubuntu-latest
2222
outputs:
2323
workflow: ${{ steps.validate.outputs.wf }}
2424
repo: ${{ steps.validate.outputs.repo }}
@@ -31,12 +31,12 @@ jobs:
3131

3232
update_workflow:
3333
name: "Update Workflow"
34-
runs-on: ubuntu-22.04
34+
runs-on: ubuntu-latest
3535
needs: check_token
3636
if: ${{ needs.check_token.outputs.workflow == 'true' }}
3737
steps:
3838
- name: "Checkout Repository"
39-
uses: actions/checkout@v4
39+
uses: actions/checkout@v3
4040

4141
- name: Update Workflows
4242
id: update

0 commit comments

Comments
 (0)