mirror of
https://github.com/konpa/devicon.git
synced 2025-08-31 10:02:12 +02:00
Create a monthly script that checks all svgs
This commit is contained in:
35
.github/workflows/check_svgs_monthly.yml
vendored
Normal file
35
.github/workflows/check_svgs_monthly.yml
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
name: Check SVGs Monthly
|
||||
on: workflow_dispatch
|
||||
# schedule:
|
||||
# - cron: '0 0 1 * *'
|
||||
jobs:
|
||||
check_develop:
|
||||
name: Check the SVGs' quality in the `develop` branch
|
||||
runs-on: ubuntu-18.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
ref: develop
|
||||
- name: Setup Python v3.8
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.8
|
||||
- name: Install dependencies
|
||||
run: python -m pip install --upgrade pip
|
||||
- name: Run the check_svg script
|
||||
run: >
|
||||
python ./.github/scripts/check_svgs_monthly.py ./devicon.json ./icons
|
||||
check_master:
|
||||
name: Check the SVGs' quality in the `master` branch
|
||||
runs-on: ubuntu-18.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2 # check out default branch, which is master
|
||||
- name: Setup Python v3.8
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.8
|
||||
- name: Install dependencies
|
||||
run: python -m pip install --upgrade pip
|
||||
- name: Run the check_svg script
|
||||
run: >
|
||||
python ./.github/scripts/check_svgs.py ./icomoon.json ./devicon.json ./icons
|
@@ -1,20 +1,32 @@
|
||||
name: Check SVGs
|
||||
on: pull_request
|
||||
name: Check SVGs On PR
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- '**.svg' # runs only when a svg is added in the PR
|
||||
jobs:
|
||||
check:
|
||||
name: Check the SVGs' quality
|
||||
runs-on: ubuntu-18.04
|
||||
steps:
|
||||
<<<<<<< HEAD:.github/workflows/check_svgs.yml
|
||||
- uses: actions/checkout@v2
|
||||
=======
|
||||
- uses: actions/checkout@v2 # check out the merge branch of the PR and base
|
||||
>>>>>>> 132dff5... Create a monthly script that checks all svgs:.github/workflows/check_svgs_on_pr.yml
|
||||
- name: Setup Python v3.8
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.8
|
||||
- name: Install dependencies
|
||||
run: python -m pip install --upgrade pip
|
||||
- name: Find files added in this PR
|
||||
uses: lots0logs/gh-action-get-changed-files@2.1.4
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Run the check_svg script
|
||||
shell: bash
|
||||
run: >
|
||||
python ./.github/scripts/check_svgs.py ./icomoon.json ./devicon.json ./icons
|
||||
python ./.github/scripts/check_svgs_on_pr.py $HOME/files.json
|
||||
- name: Comment on the PR about the result - Success
|
||||
if: success()
|
||||
uses: github-actions-up-and-running/pr-comment@v1.0.1
|
||||
@@ -30,7 +42,6 @@ jobs:
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
message: ${{ env.MESSAGE }}
|
||||
|
||||
- name: Comment on the PR about the result - Failed
|
||||
if: failure()
|
||||
uses: github-actions-up-and-running/pr-comment@v1.0.1
|
||||
@@ -55,4 +66,4 @@ jobs:
|
||||
PS. One day, I will be smart enough to fix these errors for you :persevere:. Until then, I can only point them out.
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
message: ${{ format(env.MESSAGE, env.ERR_MSGS)}}
|
||||
message: ${{ format(env.MESSAGE, env.SVG_ERR_MSGS)}}
|
Reference in New Issue
Block a user