Skip to content

Commit 2b9faad

Browse files
Update many of the actions to their latest version (#1731)
* Update many of the actions to their latest version * Fix CodeQL action * Use the latest version for all images * Whoops * Use Ubuntu for the Peek Icons workflow * Fix Peek Icons action * Remove token * chore: apply suggestions from code review Co-authored-by: Jørgen Kalsnes Hagen <43886029+Snailedlt@users.noreply.github.com> --------- Co-authored-by: Jørgen Kalsnes Hagen <43886029+Snailedlt@users.noreply.github.com>
1 parent 70df11e commit 2b9faad

10 files changed

Lines changed: 88 additions & 84 deletions

.github/drafts/optimize_svg.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ jobs:
66
peek:
77
name: Optimize the added/changed svgs
88
if: github.event.label.name == 'bot:optimize'
9-
runs-on: ubuntu-18.04
9+
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/checkout@v2
11+
- uses: actions/checkout@v3
1212
with:
1313
ref: ${{ github.head_ref }}
1414

.github/drafts/stale.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55

66
jobs:
77
stale:
8-
runs-on: ubuntu-latest
8+
runs-on: ubuntu-latestlatest
99
steps:
1010
- uses: actions/stale@main
1111
with:

.github/scripts/icomoon_peek.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
def main():
66
runner = None
77
try:
8-
args = arg_getters.get_selenium_runner_args(peek_mode=True)
8+
args = arg_getters.get_selenium_runner_args(has_token=False, peek_mode=True)
99
all_icons = filehandler.get_json_file_content(args.devicon_json_path)
1010

1111
# get only the icon object that has the name matching the pr title

.github/workflows/check_icon_pr.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,18 @@ on: pull_request
33
jobs:
44
check:
55
name: Check the `devicon.json` and the SVGs' quality
6-
runs-on: ubuntu-18.04
6+
runs-on: ubuntu-latest
77
if: startsWith(github.event.pull_request.title, 'new icon') || startsWith(github.event.pull_request.title, 'update icon') # only checks icon PR
88
steps:
9-
- uses: actions/checkout@v2
9+
- uses: actions/checkout@v3
1010

1111
- name: Check if PR is develop
1212
if: ${{ github.base_ref != 'develop' }}
1313
run: |
1414
echo -e "The PR's base branch is \`${{ github.base_ref }}\`, but should be \`develop\`\nPlease change the PR so that it's based on, and merged into \`develop\`" > ./err_messages.txt
1515
echo "wrong_branch=true" >> $GITHUB_ENV
1616
17-
- uses: actions/setup-python@v2
17+
- uses: actions/setup-python@v4
1818
if: ${{ !env.wrong_branch }}
1919
with:
2020
python-version: 3.8
@@ -32,7 +32,7 @@ jobs:
3232
run: python ./.github/scripts/check_icon_pr.py "$PR_TITLE" ./icons ./devicon.json
3333

3434
- name: Upload the err messages
35-
uses: actions/upload-artifact@v2
35+
uses: actions/upload-artifact@v3
3636
if: success()
3737
with:
3838
name: err_messages
@@ -46,7 +46,7 @@ jobs:
4646
run: echo $PR_NUM > pr_num.txt
4747

4848
- name: Upload the pr num
49-
uses: actions/upload-artifact@v2
49+
uses: actions/upload-artifact@v3
5050
if: success()
5151
with:
5252
name: pr_num
Lines changed: 50 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,61 @@
1-
name: "CodeQL"
1+
name: "Code Scanning - Action"
22

33
on:
44
push:
5-
branches: [master]
5+
branches: [master, develop]
66
pull_request:
7-
# The branches below must be a subset of the branches above
8-
branches: [master]
7+
branches: [master, develop]
98
schedule:
10-
- cron: '0 23 * * 4'
9+
# ┌───────────── minute (0 - 59)
10+
# │ ┌───────────── hour (0 - 23)
11+
# │ │ ┌───────────── day of the month (1 - 31)
12+
# │ │ │ ┌───────────── month (1 - 12 or JAN-DEC)
13+
# │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT)
14+
# │ │ │ │ │
15+
# │ │ │ │ │
16+
# │ │ │ │ │
17+
# * * * * *
18+
- cron: '30 1 * * 0'
1119

1220
jobs:
13-
analyze:
14-
name: Analyze
21+
CodeQL-Build:
22+
# CodeQL runs on ubuntu-latest, windows-latest, and macos-latest
1523
runs-on: ubuntu-latest
1624

17-
strategy:
18-
fail-fast: false
19-
matrix:
20-
# Override automatic language detection by changing the below list
21-
# Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
22-
language: ['javascript']
23-
# Learn more...
24-
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection
25+
permissions:
26+
# required for all workflows
27+
security-events: write
28+
29+
# only required for workflows in private repositories
30+
actions: read
31+
contents: read
2532

2633
steps:
27-
- name: Checkout repository
28-
uses: actions/checkout@v2
29-
with:
30-
# We must fetch at least the immediate parents so that if this is
31-
# a pull request then we can checkout the head.
32-
fetch-depth: 2
33-
34-
# If this run was triggered by a pull request event, then checkout
35-
# the head of the pull request instead of the merge commit.
36-
- run: git checkout HEAD^2
37-
if: ${{ github.event_name == 'pull_request' }}
38-
39-
# Initializes the CodeQL tools for scanning.
40-
- name: Initialize CodeQL
41-
uses: github/codeql-action/init@v1
42-
with:
43-
languages: ${{ matrix.language }}
44-
45-
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
46-
# If this step fails, then you should remove it and run the build manually (see below)
47-
- name: Autobuild
48-
uses: github/codeql-action/autobuild@v1
49-
50-
# ℹ️ Command-line programs to run using the OS shell.
51-
# 📚 https://git.io/JvXDl
52-
53-
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
54-
# and modify them (or add more) to build your code if your project
55-
# uses a compiled language
56-
57-
#- run: |
58-
# make bootstrap
59-
# make release
60-
61-
- name: Perform CodeQL Analysis
62-
uses: github/codeql-action/analyze@v1
34+
- name: Checkout repository
35+
uses: actions/checkout@v3
36+
37+
# Initializes the CodeQL tools for scanning.
38+
- name: Initialize CodeQL
39+
uses: github/codeql-action/init@v2
40+
# Override language selection by uncommenting this and choosing your languages
41+
with:
42+
languages: javascript, python
43+
44+
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
45+
# If this step fails, then you should remove it and run the build manually (see below).
46+
- name: Autobuild
47+
uses: github/codeql-action/autobuild@v2
48+
49+
# ℹ️ Command-line programs to run using the OS shell.
50+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
51+
52+
# ✏️ If the Autobuild fails above, remove it and uncomment the following
53+
# three lines and modify them (or add more) to build your code if your
54+
# project uses a compiled language
55+
56+
#- run: |
57+
# make bootstrap
58+
# make release
59+
60+
- name: Perform CodeQL Analysis
61+
uses: github/codeql-action/analyze@v2

.github/workflows/in_develop_labeler.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,20 @@ on:
55
types:
66
- completed
77
jobs:
8+
on-failure:
9+
runs-on: ubuntu-latest
10+
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
11+
steps:
12+
- run: echo "First workflow was a failure"
813
label_preflight:
914
name: Label Issue In Develop
10-
runs-on: ubuntu-18.04
15+
runs-on: ubuntu-latest
1116
if: ${{ github.event.workflow_run.conclusion == 'success' }}
1217
steps:
13-
- uses: actions/checkout@v2
18+
- uses: actions/checkout@v3
1419

1520
- name: Setup Python v3.8
16-
uses: actions/setup-python@v2
21+
uses: actions/setup-python@v4
1722
with:
1823
python-version: 3.8
1924

.github/workflows/npm_publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ jobs:
77
environment: release
88
runs-on: ubuntu-latest
99
steps:
10-
- uses: actions/checkout@v2
10+
- uses: actions/checkout@v3
1111
with:
1212
# "ref" specifies the branch to check out.
1313
# "github.event.release.target_commitish" is a global variable and specifies the branch the release targeted
1414
ref: ${{ github.event.release.target_commitish }}
1515
- name: Use Node.js v16
16-
uses: actions/setup-node@v2
16+
uses: actions/setup-node@v3
1717
with:
1818
node-version: 16
1919
registry-url: https://registry.npmjs.org/ # Specifies the registry, this field is required!

.github/workflows/peek_icons.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ jobs:
99
# fail due to system, skipped
1010
name: Peek Icons
1111
if: github.event.label.name == 'bot:peek'
12-
runs-on: windows-2019
12+
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@v2
14+
- uses: actions/checkout@v3
1515

1616
- name: Setup Python v3.8
17-
uses: actions/setup-python@v2
17+
uses: actions/setup-python@v4
1818
with:
1919
python-version: 3.8
2020

@@ -38,11 +38,11 @@ jobs:
3838
- name: Run icomoon_peek.py
3939
env:
4040
PR_TITLE: ${{ github.event.pull_request.title }}
41-
shell: cmd
41+
shell: bash
4242
run: >
4343
python ./.github/scripts/icomoon_peek.py
44-
./.github/scripts/build_assets/geckodriver-v0.32.2-win64/geckodriver.exe ./icomoon.json
45-
./devicon.json ./icons ./ --headless "%PR_TITLE%"
44+
./.github/scripts/build_assets/geckodriver-v0.32.2-linux64/geckodriver ./icomoon.json
45+
./devicon.json ./icons ./ --headless "$PR_TITLE"
4646
4747
- name: Upload the err messages (created by icomoon_peek.py)
4848
uses: actions/upload-artifact@v2.2.4

.github/workflows/post_check_icon_pr_comment.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ on:
77
jobs:
88
post_result_of_svg_check:
99
name: Post the result of the Check SVG Action
10-
runs-on: ubuntu-18.04
10+
runs-on: ubuntu-latest
1111
steps:
1212
- name: Check if the trigger run worked. If it failed, fail the current run.
1313
if: github.event.workflow_run.conclusion != 'success'
1414
uses: cutenode/action-always-fail@v1.0.1
1515

1616
- name: Download workflow artifact
17-
uses: dawidd6/action-download-artifact@v2.11.0
17+
uses: dawidd6/action-download-artifact@v2.26.1
1818
if: success()
1919
with:
2020
github_token: ${{ secrets.GITHUB_TOKEN }}
@@ -24,19 +24,19 @@ jobs:
2424
- name: Read the pr_num file
2525
if: success()
2626
id: pr_num_reader
27-
uses: juliangruber/read-file-action@v1.0.0
27+
uses: juliangruber/read-file-action@v1.1.6
2828
with:
2929
path: ./pr_num/pr_num.txt
3030

3131
- name: Read the err message file
3232
if: success()
3333
id: err_message_reader
34-
uses: juliangruber/read-file-action@v1.0.0
34+
uses: juliangruber/read-file-action@v1.1.6
3535
with:
3636
path: ./err_messages/err_messages.txt
3737

3838
- name: Comment on the PR about the result - SVG Error
39-
uses: jungwinter/comment@v1 # let us comment on a specific PR
39+
uses: jungwinter/comment@v1.1.0 # let us comment on a specific PR
4040
if: success() && (steps.err_message_reader.outputs.content != '')
4141
env:
4242
MESSAGE: |
@@ -61,7 +61,7 @@ jobs:
6161
body: ${{ format(env.MESSAGE, steps.err_message_reader.outputs.content) }}
6262

6363
- name: Comment on the PR about the result - Failure
64-
uses: jungwinter/comment@v1 # let us comment on a specific PR
64+
uses: jungwinter/comment@v1.1.0 # let us comment on a specific PR
6565
if: failure()
6666
env:
6767
MESSAGE: |

.github/workflows/post_peek_screenshot.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
jobs:
88
post_screenshots_in_comment:
99
name: Post the screenshot
10-
runs-on: ubuntu-18.04
10+
runs-on: ubuntu-latest
1111
if: github.event.action == 'completed' && github.event.workflow_run.conclusion != 'skipped'
1212
env:
1313
# three possible values: 'skipped', 'success', 'failure'
@@ -20,22 +20,22 @@ jobs:
2020
run: echo $PEEK_STATUS
2121

2222
- name: Download workflow artifact
23-
uses: dawidd6/action-download-artifact@v2.11.0
23+
uses: dawidd6/action-download-artifact@v2.26.1
2424
with:
2525
github_token: ${{ secrets.GITHUB_TOKEN }}
2626
workflow: peek_icons.yml
2727
run_id: ${{ github.event.workflow_run.id }}
2828

2929
- name: Read the pr_num file
3030
id: pr_num_reader
31-
uses: juliangruber/read-file-action@v1.0.0
31+
uses: juliangruber/read-file-action@v1.1.6
3232
with:
3333
path: ./pr_num/pr_num.txt
3434

3535
- name: Read the err message file
3636
if: success()
3737
id: err_message_reader
38-
uses: juliangruber/read-file-action@v1.0.0
38+
uses: juliangruber/read-file-action@v1.1.6
3939
with:
4040
path: ./err_messages/err_messages.txt
4141

@@ -81,7 +81,7 @@ jobs:
8181
client_id: ${{secrets.IMGUR_CLIENT_ID}}
8282

8383
- name: Comment on the PR about the result - Success
84-
uses: jungwinter/comment@v1 # let us comment on a specific PR
84+
uses: jungwinter/comment@v1.1.0 # let us comment on a specific PR
8585
if: env.PEEK_STATUS == 'success' && success()
8686
env:
8787
MESSAGE: |
@@ -138,7 +138,7 @@ jobs:
138138
139139
- name: Comment on the PR about the result - Failure
140140
if: env.PEEK_STATUS == 'failure'
141-
uses: jungwinter/comment@v1 # let us comment on a specific PR
141+
uses: jungwinter/comment@v1.1.0 # let us comment on a specific PR
142142
env:
143143
MESSAGE: |
144144
Hi there,
@@ -166,7 +166,7 @@ jobs:
166166
body: ${{ format(env.MESSAGE, steps.err_message_reader.outputs.content) }}
167167
- name: Comment on the PR about the result - Failure
168168
if: failure()
169-
uses: jungwinter/comment@v1 # let us comment on a specific PR
169+
uses: jungwinter/comment@v1.1.0 # let us comment on a specific PR
170170
env:
171171
MESSAGE: |
172172
Hi there,

0 commit comments

Comments
 (0)