Skip to content

Commit 007126d

Browse files
authored
Merge pull request #331 from datacarpentry/update/workflows
Update Workflows to Version 0.16.6
2 parents b33558e + 2d847f8 commit 007126d

9 files changed

+33
-31
lines changed

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,15 @@ on:
88
jobs:
99
send-close-signal:
1010
name: "Send closing signal"
11-
runs-on: ubuntu-latest
11+
runs-on: ubuntu-22.04
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@v3
19+
uses: actions/upload-artifact@v4
2020
with:
2121
name: pr
2222
path: ./pr
23-

.github/workflows/pr-comment.yaml

Lines changed: 5 additions & 6 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-latest
23+
runs-on: ubuntu-22.04
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-latest
77+
runs-on: ubuntu-22.04
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@v3
85+
uses: actions/checkout@v4
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-latest
123+
runs-on: ubuntu-22.04
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-latest
153+
runs-on: ubuntu-22.04
154154
if: ${{ always() && needs.test-pr.outputs.is_valid == 'false' }}
155155
env:
156156
NR: ${{ github.event.workflow_run.pull_requests[0].number }}
@@ -182,4 +182,3 @@ 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-latest
12+
runs-on: ubuntu-22.04
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-latest
14+
runs-on: ubuntu-22.04
1515
outputs:
1616
is_valid: ${{ steps.check-pr.outputs.VALID }}
1717
permissions:

.github/workflows/pr-receive.yaml

Lines changed: 9 additions & 8 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-latest
16+
runs-on: ubuntu-22.04
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@v3
28+
uses: actions/upload-artifact@v4
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-latest
51+
runs-on: ubuntu-22.04
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@v3
61+
uses: actions/checkout@v4
6262

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

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

115116
- name: "Upload Diff"
116-
uses: actions/upload-artifact@v3
117+
uses: actions/upload-artifact@v4
117118
with:
118119
name: diff
119120
path: ${{ env.CHIVE }}
120121
retention-days: 1
121122

122123
- name: "Upload Build"
123-
uses: actions/upload-artifact@v3
124+
uses: actions/upload-artifact@v4
124125
with:
125126
name: built
126127
path: ${{ env.MD }}

.github/workflows/sandpaper-main.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@ on:
2121
jobs:
2222
full-build:
2323
name: "Build Full Site"
24-
runs-on: ubuntu-latest
24+
25+
# 2024-10-01: ubuntu-latest is now 24.04 and R is not installed by default in the runner image
26+
# pin to 22.04 for now
27+
runs-on: ubuntu-22.04
2528
permissions:
2629
checks: write
2730
contents: write
@@ -32,7 +35,7 @@ jobs:
3235
steps:
3336

3437
- name: "Checkout Lesson"
35-
uses: actions/checkout@v3
38+
uses: actions/checkout@v4
3639

3740
- name: "Set up R"
3841
uses: r-lib/actions/setup-r@v2
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.16.5
1+
0.16.10

.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-latest
17+
runs-on: ubuntu-22.04
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-latest
39+
runs-on: ubuntu-22.04
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@v3
46+
uses: actions/checkout@v4
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-latest
55+
runs-on: ubuntu-22.04
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-latest
72+
runs-on: ubuntu-22.04
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@v3
79+
uses: actions/checkout@v4
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-latest
21+
runs-on: ubuntu-22.04
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-latest
34+
runs-on: ubuntu-22.04
3535
needs: check_token
3636
if: ${{ needs.check_token.outputs.workflow == 'true' }}
3737
steps:
3838
- name: "Checkout Repository"
39-
uses: actions/checkout@v3
39+
uses: actions/checkout@v4
4040

4141
- name: Update Workflows
4242
id: update

0 commit comments

Comments
 (0)