Skip to content

Commit 22d1d07

Browse files
committed
update deprecated actions
1 parent 2b304f7 commit 22d1d07

File tree

4 files changed

+62
-39
lines changed

4 files changed

+62
-39
lines changed

.github/workflows/check-markdown-task.yml

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ on:
4141
jobs:
4242
run-determination:
4343
runs-on: ubuntu-latest
44+
permissions: {}
4445
outputs:
4546
result: ${{ steps.determination.outputs.result }}
4647
steps:
@@ -60,27 +61,29 @@ jobs:
6061
RESULT="false"
6162
fi
6263
63-
echo "::set-output name=result::$RESULT"
64+
echo "result=$RESULT" >> $GITHUB_OUTPUT
6465
6566
lint:
6667
needs: run-determination
6768
if: needs.run-determination.outputs.result == 'true'
6869
runs-on: ubuntu-latest
70+
permissions:
71+
contents: read
6972

7073
steps:
7174
- name: Checkout repository
72-
uses: actions/checkout@v3
75+
uses: actions/checkout@v4
7376

7477
- name: Setup Node.js
75-
uses: actions/setup-node@v3
78+
uses: actions/setup-node@v4
7679
with:
7780
node-version: ${{ env.NODE_VERSION }}
7881

7982
- name: Initialize markdownlint-cli problem matcher
80-
uses: xt0rted/markdownlint-problem-matcher@v1
83+
uses: xt0rted/markdownlint-problem-matcher@v3
8184

8285
- name: Install Task
83-
uses: arduino/setup-task@v1
86+
uses: arduino/setup-task@v2
8487
with:
8588
repo-token: ${{ secrets.GITHUB_TOKEN }}
8689
version: 3.x
@@ -92,21 +95,23 @@ jobs:
9295
needs: run-determination
9396
if: needs.run-determination.outputs.result == 'true'
9497
runs-on: ubuntu-latest
98+
permissions:
99+
contents: read
95100

96101
steps:
97102
- name: Checkout repository
98-
uses: actions/checkout@v3
103+
uses: actions/checkout@v4
99104

100105
- name: Setup Node.js
101-
uses: actions/setup-node@v3
106+
uses: actions/setup-node@v4
102107
with:
103108
node-version: ${{ env.NODE_VERSION }}
104109

105110
- name: Install Task
106-
uses: arduino/setup-task@v1
111+
uses: arduino/setup-task@v2
107112
with:
108113
repo-token: ${{ secrets.GITHUB_TOKEN }}
109114
version: 3.x
110115

111116
- name: Check links
112-
run: task --silent markdown:check-links
117+
run: task --silent markdown:check-links

.github/workflows/check-workflows-task.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Source: https://github.com/arduino/tooling-project-assets/blob/master/workflow-templates/check-workflows-task.md
1+
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/check-workflows-task.md
22
name: Check Workflows
33

44
env:
@@ -28,21 +28,23 @@ on:
2828
jobs:
2929
validate:
3030
runs-on: ubuntu-latest
31+
permissions:
32+
contents: read
3133

3234
steps:
3335
- name: Checkout repository
34-
uses: actions/checkout@v3
36+
uses: actions/checkout@v4
3537

3638
- name: Setup Node.js
37-
uses: actions/setup-node@v3
39+
uses: actions/setup-node@v4
3840
with:
3941
node-version: ${{ env.NODE_VERSION }}
4042

4143
- name: Install Task
42-
uses: arduino/setup-task@v1
44+
uses: arduino/setup-task@v2
4345
with:
4446
repo-token: ${{ secrets.GITHUB_TOKEN }}
4547
version: 3.x
4648

4749
- name: Validate workflows
48-
run: task --silent ci:validate
50+
run: task --silent ci:validate

.github/workflows/release.yml

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ jobs:
1818
name: build (${{ matrix.config.os }}, ${{ matrix.config.arch }})
1919
runs-on:
2020
ubuntu-latest
21+
permissions:
22+
contents: read
2123
strategy:
2224
matrix:
2325
config:
@@ -58,12 +60,12 @@ jobs:
5860
5961
# this repo should contain only the patches that could not be upstreamed and the release CI nothing else
6062
- name: Checkout avrdude-packing repository
61-
uses: actions/checkout@v3
63+
uses: actions/checkout@v4
6264
with:
6365
path: avrdude-packing
6466

6567
- name: Checkout avrdude repository
66-
uses: actions/checkout@v3
68+
uses: actions/checkout@v4
6769
with:
6870
repository: avrdudes/avrdude
6971
ref: ${{ steps.get_tag_name.outputs.AVRDUDE_TAG }} # pay attention, the pathches could need updating
@@ -104,24 +106,26 @@ jobs:
104106
tar -czv ${{ env.PROJECT_NAME }}_${{ matrix.config.os }}_${{ matrix.config.arch }} -f ${{ env.PROJECT_NAME }}_${GITHUB_REF##*/}_${{ matrix.config.os }}_${{ matrix.config.arch }}.tar.gz
105107
106108
- name: Upload artifacts
107-
uses: actions/upload-artifact@v3
109+
uses: actions/upload-artifact@v4
108110
with:
109111
if-no-files-found: error
110-
name: ${{ env.ARTIFACT_NAME }}
112+
name: ${{ env.ARTIFACT_NAME }}_${{ matrix.config.os }}_${{ matrix.config.arch }}
111113
path: ${{ env.PROJECT_NAME }}/${{ env.PROJECT_NAME }}_*
112114

113115
notarize-macos:
114116
runs-on: macos-latest
115117
needs: build
118+
permissions:
119+
contents: read
116120

117121
steps:
118122
- name: Checkout repository
119-
uses: actions/checkout@v3
123+
uses: actions/checkout@v4
120124

121125
- name: Download artifacts
122-
uses: actions/download-artifact@v3
126+
uses: actions/download-artifact@v4
123127
with:
124-
name: ${{ env.ARTIFACT_NAME }}
128+
name: ${{ env.ARTIFACT_NAME }}_macOS_64bit
125129
path: ${{ env.DIST_DIR }}
126130

127131
- name: Import Code-Signing Certificates
@@ -172,26 +176,30 @@ jobs:
172176
-C ${{ env.DIST_DIR }}/ ${{ env.PROJECT_NAME }}_macOS_64bit/
173177
174178
- name: Upload artifacts
175-
uses: actions/upload-artifact@v3
179+
uses: actions/upload-artifact@v4
176180
with:
177181
if-no-files-found: error
178-
name: ${{ env.ARTIFACT_NAME }}
182+
name: ${{ env.ARTIFACT_NAME }}_macOS_64bit
179183
path: ${{ env.DIST_DIR }}
180-
184+
overwrite: true
185+
181186
create-release:
182187
runs-on:
183188
ubuntu-latest
189+
permissions:
190+
contents: write
184191
needs: [build, notarize-macos]
185192

186193
steps:
187194
- name: Checkout repository # we need package_index.template
188-
uses: actions/checkout@v3
195+
uses: actions/checkout@v4
189196

190197
- name: Download artifact
191-
uses: actions/download-artifact@v3
198+
uses: actions/download-artifact@v4
192199
with:
193-
name: ${{ env.ARTIFACT_NAME }}
200+
pattern: ${{ env.ARTIFACT_NAME }}*
194201
path: ${{ env.DIST_DIR }}
202+
merge-multiple: true
195203

196204
- name: Identify Prerelease
197205
# This is a workaround while waiting for create-release action

.github/workflows/sync-labels.yml

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,16 @@ env:
2424
jobs:
2525
check:
2626
runs-on: ubuntu-latest
27+
permissions:
28+
contents: read
2729

2830
steps:
2931
- name: Checkout repository
30-
uses: actions/checkout@v3
32+
uses: actions/checkout@v4
3133

3234
- name: Download JSON schema for labels configuration file
3335
id: download-schema
34-
uses: carlosperate/download-file-action@v1
36+
uses: carlosperate/download-file-action@v2
3537
with:
3638
file-url: https://raw.githubusercontent.com/arduino/tooling-project-assets/main/workflow-templates/assets/sync-labels/arduino-tooling-gh-label-configuration-schema.json
3739
location: ${{ runner.temp }}/label-configuration-schema
@@ -55,6 +57,7 @@ jobs:
5557
download:
5658
needs: check
5759
runs-on: ubuntu-latest
60+
permissions: {}
5861

5962
strategy:
6063
matrix:
@@ -64,24 +67,28 @@ jobs:
6467
- universal.yml
6568
- tooling.yml
6669

70+
6771
steps:
6872
- name: Download
69-
uses: carlosperate/download-file-action@v1
73+
uses: carlosperate/download-file-action@v2
7074
with:
7175
file-url: https://raw.githubusercontent.com/arduino/tooling-project-assets/main/workflow-templates/assets/sync-labels/${{ matrix.filename }}
7276

7377
- name: Pass configuration files to next job via workflow artifact
74-
uses: actions/upload-artifact@v3
78+
uses: actions/upload-artifact@v4
7579
with:
7680
path: |
7781
*.yaml
7882
*.yml
7983
if-no-files-found: error
80-
name: ${{ env.CONFIGURATIONS_ARTIFACT }}
84+
name: ${{ env.CONFIGURATIONS_ARTIFACT }}-${{ matrix.filename }}
8185

8286
sync:
8387
needs: download
8488
runs-on: ubuntu-latest
89+
permissions:
90+
contents: read
91+
issues: write
8592

8693
steps:
8794
- name: Set environment variables
@@ -103,21 +110,22 @@ jobs:
103110
run: |
104111
# Use of this flag in the github-label-sync command will cause it to only check the validity of the
105112
# configuration.
106-
echo "::set-output name=flag::--dry-run"
113+
echo "flag=--dry-run" >> $GITHUB_OUTPUT
107114
108115
- name: Checkout repository
109-
uses: actions/checkout@v3
116+
uses: actions/checkout@v4
110117

111118
- name: Download configuration files artifact
112-
uses: actions/download-artifact@v3
119+
uses: actions/download-artifact@v4
113120
with:
114-
name: ${{ env.CONFIGURATIONS_ARTIFACT }}
121+
pattern: ${{ env.CONFIGURATIONS_ARTIFACT }}-*
122+
merge-multiple: true
115123
path: ${{ env.CONFIGURATIONS_FOLDER }}
116124

117125
- name: Remove unneeded artifact
118-
uses: geekyeggo/delete-artifact@v1
126+
uses: geekyeggo/delete-artifact@v5
119127
with:
120-
name: ${{ env.CONFIGURATIONS_ARTIFACT }}
128+
name: ${{ env.CONFIGURATIONS_ARTIFACT }}-*
121129

122130
- name: Merge label configuration files
123131
run: |
@@ -136,4 +144,4 @@ jobs:
136144
github-label-sync \
137145
--labels "${{ env.MERGED_CONFIGURATION_PATH }}" \
138146
${{ steps.dry-run.outputs.flag }} \
139-
${{ github.repository }}
147+
${{ github.repository }}

0 commit comments

Comments
 (0)