Skip to content

Commit

Permalink
ci(workflows): update deprecated actions
Browse files Browse the repository at this point in the history
  • Loading branch information
ReenigneArcher committed Dec 9, 2024
1 parent b399517 commit 28d71e8
Show file tree
Hide file tree
Showing 9 changed files with 65 additions and 65 deletions.
26 changes: 13 additions & 13 deletions .github/workflows/build_icons.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ jobs:
name: Get Fonts From Icomoon
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10'

- name: Install dependencies (python, pip, npm)
Expand All @@ -21,26 +21,26 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: >
python ./.github/scripts/icomoon_build.py
./.github/scripts/build_assets/geckodriver-v0.32.2-linux64/geckodriver ./icomoon.json
python ./.github/scripts/icomoon_build.py
./.github/scripts/build_assets/geckodriver-v0.32.2-linux64/geckodriver ./icomoon.json
./devicon.json ./icons ./ $GITHUB_TOKEN --headless
- name: Upload geckodriver.log for debugging purposes
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
if: failure()
with:
name: geckodriver-log
path: ./geckodriver.log

- name: Upload log file for debugging purposes
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
if: always()
with:
name: logfile
path: ./log.txt

- name: Build devicon.min.css
if: success()
if: success()
run: npm run build-css

# - name: Upload screenshot of the newly made icons
Expand All @@ -58,11 +58,11 @@ jobs:
uses: juliangruber/[email protected]
with:
# taken from icomoon_build.py's get_release_message()
path: ./release_message.txt
path: ./release_message.txt

- name: Create Pull Request
if: success()
uses: peter-evans/create-pull-request@v3
if: success()
uses: peter-evans/create-pull-request@v7
env:
MESSAGE: |
Hello,
Expand All @@ -81,14 +81,14 @@ jobs:
More information can be found in the GitHub Action logs for this workflow.
Adios,
Adios,
Build Bot :sunglasses:
with:
branch: 'bot/build-result'
commit-message: 'Built new icons, icomoon.json and devicon.css'
title: 'bot:build new icons, icomoon.json and devicon.css'
body: >
${{
${{
format(
env.MESSAGE,
steps.release_message_step.outputs.content
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/check_icon_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ jobs:
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
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Check if PR is develop
if: ${{ github.base_ref != 'develop' }}
run: |
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
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
if: ${{ !env.wrong_branch }}
with:
with:
python-version: 3.8

- name: Install dependencies
Expand All @@ -32,7 +32,7 @@ jobs:
run: python ./.github/scripts/check_icon_pr.py "$PR_TITLE" ./icons ./devicon.json

- name: Upload the err messages
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: success()
with:
name: err_messages
Expand All @@ -46,7 +46,7 @@ jobs:
run: echo $PR_NUM > pr_num.txt

- name: Upload the pr num
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: success()
with:
name: pr_num
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
security-events: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
Expand All @@ -31,10 +31,10 @@ jobs:
security-events: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
id: setup-python
with:
python-version: '3.10'
Expand Down Expand Up @@ -65,7 +65,7 @@ jobs:
security-events: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Find Python files outside the .github folder
id: find_files
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/in_develop_labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Label Issue In Develop
on:
workflow_run:
workflows: ['On Develop PR Merge']
types:
types:
- completed
jobs:
on-failure:
Expand All @@ -15,20 +15,20 @@ jobs:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Setup Python v3.8
uses: actions/setup-python@v4
with:
uses: actions/setup-python@v5
with:
python-version: 3.8

- name: Install dependencies
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r ./.github/scripts/requirements.txt
- name: Download workflow artifact
uses: dawidd6/action-download-artifact@v2.11.0
uses: dawidd6/action-download-artifact@v7
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
workflow: peek_icons.yml
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/in_develop_labeler_preflight.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: On Develop PR Merge
on:
on:
pull_request:
types: [closed]
branches: [develop]
Expand All @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
if: github.event.pull_request.merged == true
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Save the PR number in an artifact
shell: bash
Expand All @@ -18,7 +18,7 @@ jobs:
run: echo $PR_NUM > pr_num.txt

- name: Upload the PR number
uses: actions/upload-artifact@v2.2.4
uses: actions/upload-artifact@v4
with:
name: pr_num
path: ./pr_num.txt
4 changes: 2 additions & 2 deletions .github/workflows/npm_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ jobs:
environment: release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
# "ref" specifies the branch to check out.
# "github.event.release.target_commitish" is a global variable and specifies the branch the release targeted
ref: ${{ github.event.release.target_commitish }}
- name: Use Node.js v16
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 16
registry-url: https://registry.npmjs.org/ # Specifies the registry, this field is required!
Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/peek_icons.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Peek Icons
on:
pull_request:
types: [labeled]
types: [labeled]
jobs:
peek:
# four outcomes: successful check and upload,
Expand All @@ -11,14 +11,14 @@ jobs:
if: github.event.label.name == 'bot:peek'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Setup Python v3.8
uses: actions/setup-python@v4
with:
uses: actions/setup-python@v5
with:
python-version: 3.8

- name: Install dependencies
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r ./.github/scripts/requirements.txt
Expand All @@ -30,7 +30,7 @@ jobs:
run: echo $PR_NUM > pr_num.txt

- name: Upload the PR number
uses: actions/upload-artifact@v2.2.4
uses: actions/upload-artifact@v4
with:
name: pr_num
path: ./pr_num.txt
Expand All @@ -40,26 +40,26 @@ jobs:
PR_TITLE: ${{ github.event.pull_request.title }}
shell: bash
run: >
python ./.github/scripts/icomoon_peek.py
./.github/scripts/build_assets/geckodriver-v0.32.2-linux64/geckodriver ./icomoon.json
python ./.github/scripts/icomoon_peek.py
./.github/scripts/build_assets/geckodriver-v0.32.2-linux64/geckodriver ./icomoon.json
./devicon.json ./icons ./ --headless "$PR_TITLE"
- name: Upload the err messages (created by icomoon_peek.py)
uses: actions/upload-artifact@v2.2.4
uses: actions/upload-artifact@v4
if: always()
with:
name: err_messages
path: ./err_messages.txt

- name: Upload screenshots for comments
uses: actions/upload-artifact@v2.2.4
uses: actions/upload-artifact@v4
if: success()
with:
name: screenshots
path: ./screenshots/*.png

- name: Upload geckodriver.log for debugging purposes
uses: actions/upload-artifact@v2.2.4
uses: actions/upload-artifact@v4
if: failure()
with:
name: geckodriver-log
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/post_check_icon_pr_comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@ name: Post the result of the check_icon_pr workflow into its PR.
on:
workflow_run:
workflows: ['Check Icon PR']
types:
types:
- completed
jobs:
jobs:
post_result_of_svg_check:
name: Post the result of the Check SVG Action
runs-on: ubuntu-latest
steps:
- 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/[email protected]

- name: Download workflow artifact
uses: dawidd6/action-download-artifact@v2.27.0
uses: dawidd6/action-download-artifact@v7
if: success()
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -62,7 +62,7 @@ jobs:

- name: Comment on the PR about the result - Failure
uses: jungwinter/[email protected] # let us comment on a specific PR
if: failure()
if: failure()
env:
MESSAGE: |
Hi!
Expand Down
Loading

0 comments on commit 28d71e8

Please sign in to comment.