1
0
mirror of https://github.com/konpa/devicon.git synced 2025-08-14 02:24:04 +02:00

ci(workflows): update deprecated actions

This commit is contained in:
ReenigneArcher
2024-12-09 12:50:35 -05:00
parent fa92ee011a
commit f002870bb1
9 changed files with 65 additions and 65 deletions

View File

@@ -5,9 +5,9 @@ jobs:
name: Get Fonts From Icomoon name: Get Fonts From Icomoon
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: actions/setup-python@v4 - uses: actions/setup-python@v5
with: with:
python-version: '3.10' python-version: '3.10'
- name: Install dependencies (python, pip, npm) - name: Install dependencies (python, pip, npm)
@@ -21,26 +21,26 @@ jobs:
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: > run: >
python ./.github/scripts/icomoon_build.py python ./.github/scripts/icomoon_build.py
./.github/scripts/build_assets/geckodriver-v0.32.2-linux64/geckodriver ./icomoon.json ./.github/scripts/build_assets/geckodriver-v0.32.2-linux64/geckodriver ./icomoon.json
./devicon.json ./icons ./ $GITHUB_TOKEN --headless ./devicon.json ./icons ./ $GITHUB_TOKEN --headless
- name: Upload geckodriver.log for debugging purposes - name: Upload geckodriver.log for debugging purposes
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v4
if: failure() if: failure()
with: with:
name: geckodriver-log name: geckodriver-log
path: ./geckodriver.log path: ./geckodriver.log
- name: Upload log file for debugging purposes - name: Upload log file for debugging purposes
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v4
if: always() if: always()
with: with:
name: logfile name: logfile
path: ./log.txt path: ./log.txt
- name: Build devicon.min.css - name: Build devicon.min.css
if: success() if: success()
run: npm run build-css run: npm run build-css
# - name: Upload screenshot of the newly made icons # - name: Upload screenshot of the newly made icons
@@ -58,11 +58,11 @@ jobs:
uses: juliangruber/read-file-action@v1.0.0 uses: juliangruber/read-file-action@v1.0.0
with: with:
# taken from icomoon_build.py's get_release_message() # taken from icomoon_build.py's get_release_message()
path: ./release_message.txt path: ./release_message.txt
- name: Create Pull Request - name: Create Pull Request
if: success() if: success()
uses: peter-evans/create-pull-request@v3 uses: peter-evans/create-pull-request@v7
env: env:
MESSAGE: | MESSAGE: |
Hello, Hello,
@@ -81,14 +81,14 @@ jobs:
More information can be found in the GitHub Action logs for this workflow. More information can be found in the GitHub Action logs for this workflow.
Adios, Adios,
Build Bot :sunglasses: Build Bot :sunglasses:
with: with:
branch: 'bot/build-result' branch: 'bot/build-result'
commit-message: 'Built new icons, icomoon.json and devicon.css' commit-message: 'Built new icons, icomoon.json and devicon.css'
title: 'bot:build new icons, icomoon.json and devicon.css' title: 'bot:build new icons, icomoon.json and devicon.css'
body: > body: >
${{ ${{
format( format(
env.MESSAGE, env.MESSAGE,
steps.release_message_step.outputs.content steps.release_message_step.outputs.content

View File

@@ -6,17 +6,17 @@ jobs:
runs-on: ubuntu-latest 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@v3 - uses: actions/checkout@v4
- name: Check if PR is develop - name: Check if PR is develop
if: ${{ github.base_ref != 'develop' }} if: ${{ github.base_ref != 'develop' }}
run: | 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 -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@v4 - uses: actions/setup-python@v5
if: ${{ !env.wrong_branch }} if: ${{ !env.wrong_branch }}
with: with:
python-version: 3.8 python-version: 3.8
- name: Install dependencies - name: Install dependencies
@@ -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@v3 uses: actions/upload-artifact@v4
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@v3 uses: actions/upload-artifact@v4
if: success() if: success()
with: with:
name: pr_num name: pr_num

View File

@@ -15,7 +15,7 @@ jobs:
security-events: write security-events: write
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v3 uses: actions/checkout@v4
- name: Initialize CodeQL - name: Initialize CodeQL
uses: github/codeql-action/init@v2 uses: github/codeql-action/init@v2
@@ -31,10 +31,10 @@ jobs:
security-events: write security-events: write
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v3 uses: actions/checkout@v4
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v4 uses: actions/setup-python@v5
id: setup-python id: setup-python
with: with:
python-version: '3.10' python-version: '3.10'
@@ -65,7 +65,7 @@ jobs:
security-events: write security-events: write
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v3 uses: actions/checkout@v4
- name: Find Python files outside the .github folder - name: Find Python files outside the .github folder
id: find_files id: find_files

View File

@@ -2,7 +2,7 @@ name: Label Issue In Develop
on: on:
workflow_run: workflow_run:
workflows: ['On Develop PR Merge'] workflows: ['On Develop PR Merge']
types: types:
- completed - completed
jobs: jobs:
on-failure: on-failure:
@@ -15,20 +15,20 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }} if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: Setup Python v3.8 - name: Setup Python v3.8
uses: actions/setup-python@v4 uses: actions/setup-python@v5
with: with:
python-version: 3.8 python-version: 3.8
- name: Install dependencies - name: Install dependencies
run: | run: |
python -m pip install --upgrade pip python -m pip install --upgrade pip
pip install -r ./.github/scripts/requirements.txt pip install -r ./.github/scripts/requirements.txt
- name: Download workflow artifact - name: Download workflow artifact
uses: dawidd6/action-download-artifact@v2.11.0 uses: dawidd6/action-download-artifact@v7
with: with:
github_token: ${{ secrets.GITHUB_TOKEN }} github_token: ${{ secrets.GITHUB_TOKEN }}
workflow: peek_icons.yml workflow: peek_icons.yml

View File

@@ -1,5 +1,5 @@
name: On Develop PR Merge name: On Develop PR Merge
on: on:
pull_request: pull_request:
types: [closed] types: [closed]
branches: [develop] branches: [develop]
@@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: github.event.pull_request.merged == true if: github.event.pull_request.merged == true
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: Save the PR number in an artifact - name: Save the PR number in an artifact
shell: bash shell: bash
@@ -18,7 +18,7 @@ jobs:
run: echo $PR_NUM > pr_num.txt run: echo $PR_NUM > pr_num.txt
- name: Upload the PR number - name: Upload the PR number
uses: actions/upload-artifact@v2.2.4 uses: actions/upload-artifact@v4
with: with:
name: pr_num name: pr_num
path: ./pr_num.txt path: ./pr_num.txt

View File

@@ -7,13 +7,13 @@ jobs:
environment: release environment: release
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
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@v3 uses: actions/setup-node@v4
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!

View File

@@ -1,7 +1,7 @@
name: Peek Icons name: Peek Icons
on: on:
pull_request: pull_request:
types: [labeled] types: [labeled]
jobs: jobs:
peek: peek:
# four outcomes: successful check and upload, # four outcomes: successful check and upload,
@@ -11,14 +11,14 @@ jobs:
if: github.event.label.name == 'bot:peek' if: github.event.label.name == 'bot:peek'
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: Setup Python v3.8 - name: Setup Python v3.8
uses: actions/setup-python@v4 uses: actions/setup-python@v5
with: with:
python-version: 3.8 python-version: 3.8
- name: Install dependencies - name: Install dependencies
run: | run: |
python -m pip install --upgrade pip python -m pip install --upgrade pip
pip install -r ./.github/scripts/requirements.txt pip install -r ./.github/scripts/requirements.txt
@@ -30,7 +30,7 @@ jobs:
run: echo $PR_NUM > pr_num.txt run: echo $PR_NUM > pr_num.txt
- name: Upload the PR number - name: Upload the PR number
uses: actions/upload-artifact@v2.2.4 uses: actions/upload-artifact@v4
with: with:
name: pr_num name: pr_num
path: ./pr_num.txt path: ./pr_num.txt
@@ -40,26 +40,26 @@ jobs:
PR_TITLE: ${{ github.event.pull_request.title }} PR_TITLE: ${{ github.event.pull_request.title }}
shell: bash shell: bash
run: > run: >
python ./.github/scripts/icomoon_peek.py python ./.github/scripts/icomoon_peek.py
./.github/scripts/build_assets/geckodriver-v0.32.2-linux64/geckodriver ./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@v4
if: always() if: always()
with: with:
name: err_messages name: err_messages
path: ./err_messages.txt path: ./err_messages.txt
- name: Upload screenshots for comments - name: Upload screenshots for comments
uses: actions/upload-artifact@v2.2.4 uses: actions/upload-artifact@v4
if: success() if: success()
with: with:
name: screenshots name: screenshots
path: ./screenshots/*.png path: ./screenshots/*.png
- name: Upload geckodriver.log for debugging purposes - name: Upload geckodriver.log for debugging purposes
uses: actions/upload-artifact@v2.2.4 uses: actions/upload-artifact@v4
if: failure() if: failure()
with: with:
name: geckodriver-log name: geckodriver-log

View File

@@ -2,19 +2,19 @@ name: Post the result of the check_icon_pr workflow into its PR.
on: on:
workflow_run: workflow_run:
workflows: ['Check Icon PR'] workflows: ['Check Icon PR']
types: types:
- completed - completed
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-latest 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.27.0 uses: dawidd6/action-download-artifact@v7
if: success() if: success()
with: with:
github_token: ${{ secrets.GITHUB_TOKEN }} github_token: ${{ secrets.GITHUB_TOKEN }}
@@ -62,7 +62,7 @@ jobs:
- name: Comment on the PR about the result - Failure - name: Comment on the PR about the result - Failure
uses: jungwinter/comment@v1.1.0 # 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: |
Hi! Hi!

View File

@@ -2,14 +2,14 @@ name: Post the screenshots into a comment from Peek Icons workflow
on: on:
workflow_run: workflow_run:
workflows: ['Peek Icons'] workflows: ['Peek Icons']
types: types:
- completed - completed
jobs: jobs:
post_screenshots_in_comment: post_screenshots_in_comment:
name: Post the screenshot name: Post the screenshot
runs-on: ubuntu-latest 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'
# have to print github.event to console to see these values # have to print github.event to console to see these values
# note: can't use this env variable up in the if statement above for some reason. # note: can't use this env variable up in the if statement above for some reason.
@@ -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.27.0 uses: dawidd6/action-download-artifact@v7
with: with:
github_token: ${{ secrets.GITHUB_TOKEN }} github_token: ${{ secrets.GITHUB_TOKEN }}
workflow: peek_icons.yml workflow: peek_icons.yml
@@ -48,7 +48,7 @@ jobs:
path: ./screenshots/new_svgs.png path: ./screenshots/new_svgs.png
client_id: ${{secrets.IMGUR_CLIENT_ID}} client_id: ${{secrets.IMGUR_CLIENT_ID}}
- name: Upload zoomed in screenshot of the SVGs gotten from the artifacts - name: Upload zoomed in screenshot of the SVGs gotten from the artifacts
id: svgs_detailed_img_step id: svgs_detailed_img_step
uses: devicons/public-upload-to-imgur@v2.2.2 uses: devicons/public-upload-to-imgur@v2.2.2
if: env.PEEK_STATUS == 'success' && success() if: env.PEEK_STATUS == 'success' && success()
@@ -106,8 +106,8 @@ jobs:
{5} {5}
The maintainers will now check for: The maintainers will now check for:
1. The number of Glyphs matches the number of SVGs that were selected. 1. The number of Glyphs matches the number of SVGs that were selected.
2. The icons (second group of pictures) look the same as the SVGs (first group of pictures). 2. The icons (second group of pictures) look the same as the SVGs (first group of pictures).
3. The icons are of high quality (legible, matches the official logo, etc.) 3. The icons are of high quality (legible, matches the official logo, etc.)
4. A new object is added in the `devicon.json` file at the correct alphabetic position as seen [here](https://github.com/devicons/devicon/wiki/Updating-%60devicon.json%60) 4. A new object is added in the `devicon.json` file at the correct alphabetic position as seen [here](https://github.com/devicons/devicon/wiki/Updating-%60devicon.json%60)
@@ -117,23 +117,23 @@ jobs:
Note: If the images don't show up, it has been autodeleted by Imgur after 6 months due to our API choice. Note: If the images don't show up, it has been autodeleted by Imgur after 6 months due to our API choice.
Cheers, Cheers,
Peek Bot :blush: Peek Bot :blush:
with: with:
type: create type: create
issue_number: ${{ steps.pr_num_reader.outputs.content }} issue_number: ${{ steps.pr_num_reader.outputs.content }}
token: ${{ secrets.GITHUB_TOKEN }} token: ${{ secrets.GITHUB_TOKEN }}
body: > body: >
${{ ${{
format( format(
env.MESSAGE, env.MESSAGE,
fromJSON(steps.svgs_overview_img_step.outputs.markdown_urls)[0], fromJSON(steps.svgs_overview_img_step.outputs.markdown_urls)[0],
join(fromJSON(steps.svgs_detailed_img_step.outputs.markdown_urls), ' '), join(fromJSON(steps.svgs_detailed_img_step.outputs.markdown_urls), ' '),
fromJSON(steps.icons_overview_img_step.outputs.markdown_urls)[0], fromJSON(steps.icons_overview_img_step.outputs.markdown_urls)[0],
join(fromJSON(steps.icons_detailed_img_step.outputs.markdown_urls), ' '), join(fromJSON(steps.icons_detailed_img_step.outputs.markdown_urls), ' '),
join(fromJSON(steps.colored_icons_detailed_img_step.outputs.markdown_urls), ' '), join(fromJSON(steps.colored_icons_detailed_img_step.outputs.markdown_urls), ' '),
steps.err_message_reader.outputs.content steps.err_message_reader.outputs.content
) )
}} }}
- name: Comment on the PR about the result - Failure - name: Comment on the PR about the result - Failure
@@ -155,9 +155,9 @@ jobs:
- Your icon information has been added to the `devicon.json` as seen [here](https://github.com/devicons/devicon/wiki/Updating-%60devicon.json%60) - Your icon information has been added to the `devicon.json` as seen [here](https://github.com/devicons/devicon/wiki/Updating-%60devicon.json%60)
- Your PR title follows the format seen [here](https://github.com/devicons/devicon/wiki/Overview-on-Submitting-Icons) - Your PR title follows the format seen [here](https://github.com/devicons/devicon/wiki/Overview-on-Submitting-Icons)
I will retry once everything is fixed. If I still fail or there are other error, the maintainers will investigate. I will retry once everything is fixed. If I still fail or there are other error, the maintainers will investigate.
Best of luck, Best of luck,
Peek Bot :relaxed: Peek Bot :relaxed:
with: with:
type: create type: create
@@ -174,7 +174,7 @@ jobs:
I'm Devicons' Peek Bot and we've ran into a problem with the `post_peek_screenshot` workflow. I'm Devicons' Peek Bot and we've ran into a problem with the `post_peek_screenshot` workflow.
The maintainers will take a look and fix the issue. Please wait for further instructions. The maintainers will take a look and fix the issue. Please wait for further instructions.
Thank you, Thank you,
Peek Bot :relaxed: Peek Bot :relaxed:
with: with:
type: create type: create