mirror of
https://github.com/konpa/devicon.git
synced 2025-07-31 20:00:16 +02:00
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>
This commit is contained in:
4
.github/drafts/optimize_svg.yml
vendored
4
.github/drafts/optimize_svg.yml
vendored
@@ -6,9 +6,9 @@ jobs:
|
|||||||
peek:
|
peek:
|
||||||
name: Optimize the added/changed svgs
|
name: Optimize the added/changed svgs
|
||||||
if: github.event.label.name == 'bot:optimize'
|
if: github.event.label.name == 'bot:optimize'
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
ref: ${{ github.head_ref }}
|
ref: ${{ github.head_ref }}
|
||||||
|
|
||||||
|
2
.github/drafts/stale.yml
vendored
2
.github/drafts/stale.yml
vendored
@@ -5,7 +5,7 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
stale:
|
stale:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latestlatest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/stale@main
|
- uses: actions/stale@main
|
||||||
with:
|
with:
|
||||||
|
2
.github/scripts/icomoon_peek.py
vendored
2
.github/scripts/icomoon_peek.py
vendored
@@ -5,7 +5,7 @@ from build_assets import filehandler, arg_getters, util
|
|||||||
def main():
|
def main():
|
||||||
runner = None
|
runner = None
|
||||||
try:
|
try:
|
||||||
args = arg_getters.get_selenium_runner_args(peek_mode=True)
|
args = arg_getters.get_selenium_runner_args(has_token=False, peek_mode=True)
|
||||||
all_icons = filehandler.get_json_file_content(args.devicon_json_path)
|
all_icons = filehandler.get_json_file_content(args.devicon_json_path)
|
||||||
|
|
||||||
# get only the icon object that has the name matching the pr title
|
# get only the icon object that has the name matching the pr title
|
||||||
|
10
.github/workflows/check_icon_pr.yml
vendored
10
.github/workflows/check_icon_pr.yml
vendored
@@ -3,10 +3,10 @@ on: pull_request
|
|||||||
jobs:
|
jobs:
|
||||||
check:
|
check:
|
||||||
name: Check the `devicon.json` and the SVGs' quality
|
name: Check the `devicon.json` and the SVGs' quality
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-latest
|
||||||
if: startsWith(github.event.pull_request.title, 'new icon') || startsWith(github.event.pull_request.title, 'update icon') # only checks icon PR
|
if: startsWith(github.event.pull_request.title, 'new icon') || startsWith(github.event.pull_request.title, 'update icon') # only checks icon PR
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Check if PR is develop
|
- name: Check if PR is develop
|
||||||
if: ${{ github.base_ref != 'develop' }}
|
if: ${{ github.base_ref != 'develop' }}
|
||||||
@@ -14,7 +14,7 @@ jobs:
|
|||||||
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
|
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
|
||||||
echo "wrong_branch=true" >> $GITHUB_ENV
|
echo "wrong_branch=true" >> $GITHUB_ENV
|
||||||
|
|
||||||
- uses: actions/setup-python@v2
|
- uses: actions/setup-python@v4
|
||||||
if: ${{ !env.wrong_branch }}
|
if: ${{ !env.wrong_branch }}
|
||||||
with:
|
with:
|
||||||
python-version: 3.8
|
python-version: 3.8
|
||||||
@@ -32,7 +32,7 @@ jobs:
|
|||||||
run: python ./.github/scripts/check_icon_pr.py "$PR_TITLE" ./icons ./devicon.json
|
run: python ./.github/scripts/check_icon_pr.py "$PR_TITLE" ./icons ./devicon.json
|
||||||
|
|
||||||
- name: Upload the err messages
|
- name: Upload the err messages
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v3
|
||||||
if: success()
|
if: success()
|
||||||
with:
|
with:
|
||||||
name: err_messages
|
name: err_messages
|
||||||
@@ -46,7 +46,7 @@ jobs:
|
|||||||
run: echo $PR_NUM > pr_num.txt
|
run: echo $PR_NUM > pr_num.txt
|
||||||
|
|
||||||
- name: Upload the pr num
|
- name: Upload the pr num
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v3
|
||||||
if: success()
|
if: success()
|
||||||
with:
|
with:
|
||||||
name: pr_num
|
name: pr_num
|
||||||
|
69
.github/workflows/codeql-analysis.yml
vendored
69
.github/workflows/codeql-analysis.yml
vendored
@@ -1,62 +1,61 @@
|
|||||||
name: "CodeQL"
|
name: "Code Scanning - Action"
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [master]
|
branches: [master, develop]
|
||||||
pull_request:
|
pull_request:
|
||||||
# The branches below must be a subset of the branches above
|
branches: [master, develop]
|
||||||
branches: [master]
|
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 23 * * 4'
|
# ┌───────────── minute (0 - 59)
|
||||||
|
# │ ┌───────────── hour (0 - 23)
|
||||||
|
# │ │ ┌───────────── day of the month (1 - 31)
|
||||||
|
# │ │ │ ┌───────────── month (1 - 12 or JAN-DEC)
|
||||||
|
# │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT)
|
||||||
|
# │ │ │ │ │
|
||||||
|
# │ │ │ │ │
|
||||||
|
# │ │ │ │ │
|
||||||
|
# * * * * *
|
||||||
|
- cron: '30 1 * * 0'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
analyze:
|
CodeQL-Build:
|
||||||
name: Analyze
|
# CodeQL runs on ubuntu-latest, windows-latest, and macos-latest
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
strategy:
|
permissions:
|
||||||
fail-fast: false
|
# required for all workflows
|
||||||
matrix:
|
security-events: write
|
||||||
# Override automatic language detection by changing the below list
|
|
||||||
# Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
|
# only required for workflows in private repositories
|
||||||
language: ['javascript']
|
actions: read
|
||||||
# Learn more...
|
contents: read
|
||||||
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v3
|
||||||
with:
|
|
||||||
# We must fetch at least the immediate parents so that if this is
|
|
||||||
# a pull request then we can checkout the head.
|
|
||||||
fetch-depth: 2
|
|
||||||
|
|
||||||
# If this run was triggered by a pull request event, then checkout
|
|
||||||
# the head of the pull request instead of the merge commit.
|
|
||||||
- run: git checkout HEAD^2
|
|
||||||
if: ${{ github.event_name == 'pull_request' }}
|
|
||||||
|
|
||||||
# Initializes the CodeQL tools for scanning.
|
# Initializes the CodeQL tools for scanning.
|
||||||
- name: Initialize CodeQL
|
- name: Initialize CodeQL
|
||||||
uses: github/codeql-action/init@v1
|
uses: github/codeql-action/init@v2
|
||||||
|
# Override language selection by uncommenting this and choosing your languages
|
||||||
with:
|
with:
|
||||||
languages: ${{ matrix.language }}
|
languages: javascript, python
|
||||||
|
|
||||||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
|
||||||
# If this step fails, then you should remove it and run the build manually (see below)
|
# If this step fails, then you should remove it and run the build manually (see below).
|
||||||
- name: Autobuild
|
- name: Autobuild
|
||||||
uses: github/codeql-action/autobuild@v1
|
uses: github/codeql-action/autobuild@v2
|
||||||
|
|
||||||
# ℹ️ Command-line programs to run using the OS shell.
|
# ℹ️ Command-line programs to run using the OS shell.
|
||||||
# 📚 https://git.io/JvXDl
|
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
|
||||||
|
|
||||||
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
|
# ✏️ If the Autobuild fails above, remove it and uncomment the following
|
||||||
# and modify them (or add more) to build your code if your project
|
# three lines and modify them (or add more) to build your code if your
|
||||||
# uses a compiled language
|
# project uses a compiled language
|
||||||
|
|
||||||
#- run: |
|
#- run: |
|
||||||
# make bootstrap
|
# make bootstrap
|
||||||
# make release
|
# make release
|
||||||
|
|
||||||
- name: Perform CodeQL Analysis
|
- name: Perform CodeQL Analysis
|
||||||
uses: github/codeql-action/analyze@v1
|
uses: github/codeql-action/analyze@v2
|
||||||
|
11
.github/workflows/in_develop_labeler.yml
vendored
11
.github/workflows/in_develop_labeler.yml
vendored
@@ -5,15 +5,20 @@ on:
|
|||||||
types:
|
types:
|
||||||
- completed
|
- completed
|
||||||
jobs:
|
jobs:
|
||||||
|
on-failure:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
|
||||||
|
steps:
|
||||||
|
- run: echo "First workflow was a failure"
|
||||||
label_preflight:
|
label_preflight:
|
||||||
name: Label Issue In Develop
|
name: Label Issue In Develop
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-latest
|
||||||
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Setup Python v3.8
|
- name: Setup Python v3.8
|
||||||
uses: actions/setup-python@v2
|
uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: 3.8
|
python-version: 3.8
|
||||||
|
|
||||||
|
4
.github/workflows/npm_publish.yml
vendored
4
.github/workflows/npm_publish.yml
vendored
@@ -7,13 +7,13 @@ jobs:
|
|||||||
environment: release
|
environment: release
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
# "ref" specifies the branch to check out.
|
# "ref" specifies the branch to check out.
|
||||||
# "github.event.release.target_commitish" is a global variable and specifies the branch the release targeted
|
# "github.event.release.target_commitish" is a global variable and specifies the branch the release targeted
|
||||||
ref: ${{ github.event.release.target_commitish }}
|
ref: ${{ github.event.release.target_commitish }}
|
||||||
- name: Use Node.js v16
|
- name: Use Node.js v16
|
||||||
uses: actions/setup-node@v2
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: 16
|
node-version: 16
|
||||||
registry-url: https://registry.npmjs.org/ # Specifies the registry, this field is required!
|
registry-url: https://registry.npmjs.org/ # Specifies the registry, this field is required!
|
||||||
|
12
.github/workflows/peek_icons.yml
vendored
12
.github/workflows/peek_icons.yml
vendored
@@ -9,12 +9,12 @@ jobs:
|
|||||||
# fail due to system, skipped
|
# fail due to system, skipped
|
||||||
name: Peek Icons
|
name: Peek Icons
|
||||||
if: github.event.label.name == 'bot:peek'
|
if: github.event.label.name == 'bot:peek'
|
||||||
runs-on: windows-2019
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Setup Python v3.8
|
- name: Setup Python v3.8
|
||||||
uses: actions/setup-python@v2
|
uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: 3.8
|
python-version: 3.8
|
||||||
|
|
||||||
@@ -38,11 +38,11 @@ jobs:
|
|||||||
- name: Run icomoon_peek.py
|
- name: Run icomoon_peek.py
|
||||||
env:
|
env:
|
||||||
PR_TITLE: ${{ github.event.pull_request.title }}
|
PR_TITLE: ${{ github.event.pull_request.title }}
|
||||||
shell: cmd
|
shell: bash
|
||||||
run: >
|
run: >
|
||||||
python ./.github/scripts/icomoon_peek.py
|
python ./.github/scripts/icomoon_peek.py
|
||||||
./.github/scripts/build_assets/geckodriver-v0.32.2-win64/geckodriver.exe ./icomoon.json
|
./.github/scripts/build_assets/geckodriver-v0.32.2-linux64/geckodriver ./icomoon.json
|
||||||
./devicon.json ./icons ./ --headless "%PR_TITLE%"
|
./devicon.json ./icons ./ --headless "$PR_TITLE"
|
||||||
|
|
||||||
- name: Upload the err messages (created by icomoon_peek.py)
|
- name: Upload the err messages (created by icomoon_peek.py)
|
||||||
uses: actions/upload-artifact@v2.2.4
|
uses: actions/upload-artifact@v2.2.4
|
||||||
|
12
.github/workflows/post_check_icon_pr_comment.yml
vendored
12
.github/workflows/post_check_icon_pr_comment.yml
vendored
@@ -7,14 +7,14 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
post_result_of_svg_check:
|
post_result_of_svg_check:
|
||||||
name: Post the result of the Check SVG Action
|
name: Post the result of the Check SVG Action
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Check if the trigger run worked. If it failed, fail the current run.
|
- name: Check if the trigger run worked. If it failed, fail the current run.
|
||||||
if: github.event.workflow_run.conclusion != 'success'
|
if: github.event.workflow_run.conclusion != 'success'
|
||||||
uses: cutenode/action-always-fail@v1.0.1
|
uses: cutenode/action-always-fail@v1.0.1
|
||||||
|
|
||||||
- name: Download workflow artifact
|
- name: Download workflow artifact
|
||||||
uses: dawidd6/action-download-artifact@v2.11.0
|
uses: dawidd6/action-download-artifact@v2.26.1
|
||||||
if: success()
|
if: success()
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -24,19 +24,19 @@ jobs:
|
|||||||
- name: Read the pr_num file
|
- name: Read the pr_num file
|
||||||
if: success()
|
if: success()
|
||||||
id: pr_num_reader
|
id: pr_num_reader
|
||||||
uses: juliangruber/read-file-action@v1.0.0
|
uses: juliangruber/read-file-action@v1.1.6
|
||||||
with:
|
with:
|
||||||
path: ./pr_num/pr_num.txt
|
path: ./pr_num/pr_num.txt
|
||||||
|
|
||||||
- name: Read the err message file
|
- name: Read the err message file
|
||||||
if: success()
|
if: success()
|
||||||
id: err_message_reader
|
id: err_message_reader
|
||||||
uses: juliangruber/read-file-action@v1.0.0
|
uses: juliangruber/read-file-action@v1.1.6
|
||||||
with:
|
with:
|
||||||
path: ./err_messages/err_messages.txt
|
path: ./err_messages/err_messages.txt
|
||||||
|
|
||||||
- name: Comment on the PR about the result - SVG Error
|
- name: Comment on the PR about the result - SVG Error
|
||||||
uses: jungwinter/comment@v1 # let us comment on a specific PR
|
uses: jungwinter/comment@v1.1.0 # let us comment on a specific PR
|
||||||
if: success() && (steps.err_message_reader.outputs.content != '')
|
if: success() && (steps.err_message_reader.outputs.content != '')
|
||||||
env:
|
env:
|
||||||
MESSAGE: |
|
MESSAGE: |
|
||||||
@@ -61,7 +61,7 @@ jobs:
|
|||||||
body: ${{ format(env.MESSAGE, steps.err_message_reader.outputs.content) }}
|
body: ${{ format(env.MESSAGE, steps.err_message_reader.outputs.content) }}
|
||||||
|
|
||||||
- name: Comment on the PR about the result - Failure
|
- name: Comment on the PR about the result - Failure
|
||||||
uses: jungwinter/comment@v1 # let us comment on a specific PR
|
uses: jungwinter/comment@v1.1.0 # let us comment on a specific PR
|
||||||
if: failure()
|
if: failure()
|
||||||
env:
|
env:
|
||||||
MESSAGE: |
|
MESSAGE: |
|
||||||
|
14
.github/workflows/post_peek_screenshot.yml
vendored
14
.github/workflows/post_peek_screenshot.yml
vendored
@@ -7,7 +7,7 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
post_screenshots_in_comment:
|
post_screenshots_in_comment:
|
||||||
name: Post the screenshot
|
name: Post the screenshot
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-latest
|
||||||
if: github.event.action == 'completed' && github.event.workflow_run.conclusion != 'skipped'
|
if: github.event.action == 'completed' && github.event.workflow_run.conclusion != 'skipped'
|
||||||
env:
|
env:
|
||||||
# three possible values: 'skipped', 'success', 'failure'
|
# three possible values: 'skipped', 'success', 'failure'
|
||||||
@@ -20,7 +20,7 @@ jobs:
|
|||||||
run: echo $PEEK_STATUS
|
run: echo $PEEK_STATUS
|
||||||
|
|
||||||
- name: Download workflow artifact
|
- name: Download workflow artifact
|
||||||
uses: dawidd6/action-download-artifact@v2.11.0
|
uses: dawidd6/action-download-artifact@v2.26.1
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
workflow: peek_icons.yml
|
workflow: peek_icons.yml
|
||||||
@@ -28,14 +28,14 @@ jobs:
|
|||||||
|
|
||||||
- name: Read the pr_num file
|
- name: Read the pr_num file
|
||||||
id: pr_num_reader
|
id: pr_num_reader
|
||||||
uses: juliangruber/read-file-action@v1.0.0
|
uses: juliangruber/read-file-action@v1.1.6
|
||||||
with:
|
with:
|
||||||
path: ./pr_num/pr_num.txt
|
path: ./pr_num/pr_num.txt
|
||||||
|
|
||||||
- name: Read the err message file
|
- name: Read the err message file
|
||||||
if: success()
|
if: success()
|
||||||
id: err_message_reader
|
id: err_message_reader
|
||||||
uses: juliangruber/read-file-action@v1.0.0
|
uses: juliangruber/read-file-action@v1.1.6
|
||||||
with:
|
with:
|
||||||
path: ./err_messages/err_messages.txt
|
path: ./err_messages/err_messages.txt
|
||||||
|
|
||||||
@@ -81,7 +81,7 @@ jobs:
|
|||||||
client_id: ${{secrets.IMGUR_CLIENT_ID}}
|
client_id: ${{secrets.IMGUR_CLIENT_ID}}
|
||||||
|
|
||||||
- name: Comment on the PR about the result - Success
|
- name: Comment on the PR about the result - Success
|
||||||
uses: jungwinter/comment@v1 # let us comment on a specific PR
|
uses: jungwinter/comment@v1.1.0 # let us comment on a specific PR
|
||||||
if: env.PEEK_STATUS == 'success' && success()
|
if: env.PEEK_STATUS == 'success' && success()
|
||||||
env:
|
env:
|
||||||
MESSAGE: |
|
MESSAGE: |
|
||||||
@@ -138,7 +138,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Comment on the PR about the result - Failure
|
- name: Comment on the PR about the result - Failure
|
||||||
if: env.PEEK_STATUS == 'failure'
|
if: env.PEEK_STATUS == 'failure'
|
||||||
uses: jungwinter/comment@v1 # let us comment on a specific PR
|
uses: jungwinter/comment@v1.1.0 # let us comment on a specific PR
|
||||||
env:
|
env:
|
||||||
MESSAGE: |
|
MESSAGE: |
|
||||||
Hi there,
|
Hi there,
|
||||||
@@ -166,7 +166,7 @@ jobs:
|
|||||||
body: ${{ format(env.MESSAGE, steps.err_message_reader.outputs.content) }}
|
body: ${{ format(env.MESSAGE, steps.err_message_reader.outputs.content) }}
|
||||||
- name: Comment on the PR about the result - Failure
|
- name: Comment on the PR about the result - Failure
|
||||||
if: failure()
|
if: failure()
|
||||||
uses: jungwinter/comment@v1 # let us comment on a specific PR
|
uses: jungwinter/comment@v1.1.0 # let us comment on a specific PR
|
||||||
env:
|
env:
|
||||||
MESSAGE: |
|
MESSAGE: |
|
||||||
Hi there,
|
Hi there,
|
||||||
|
Reference in New Issue
Block a user