1
0
mirror of https://github.com/konpa/devicon.git synced 2025-02-24 17:22:28 +01:00
devicon/.github/workflows/peek_icons.yml
Thomas Bui cb34247467
Fix issue with "post_peek_screenshot" action failing when it's not supposed to (#520)
* Change the boolean in post_check_svgs_comment

* Fixed issue where post_peek action would fail randomly

* Fixed post_peek action not acting correctly

* Apply suggestions from code review (change to PR Number)

Co-authored-by: David Leal <halfpacho@gmail.com>

Co-authored-by: David Leal <halfpacho@gmail.com>
2021-02-25 14:34:21 +01:00

60 lines
1.6 KiB
YAML

name: Peek Icons
on:
pull_request:
types: [labeled]
jobs:
peek:
# four outcomes: successful check and upload,
# unsuccessful check (fail due to user),
# fail due to system, skipped
name: Peek Icons
if: github.event.label.name == 'bot:peek'
runs-on: windows-2019
steps:
- uses: actions/checkout@v2
- 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
pip install -r ./.github/scripts/requirements.txt
- name: Save the PR number in an artifact
shell: bash
env:
PR_NUM: ${{ github.event.number }}
run: echo $PR_NUM > pr_num.txt
- name: Upload the PR number
uses: actions/upload-artifact@v2
with:
name: pr_num
path: ./pr_num.txt
- name: Run icomoon_peek.py
env:
PR_TITLE: ${{ github.event.pull_request.title }}
shell: cmd
run: >
python ./.github/scripts/icomoon_peek.py
./.github/scripts/build_assets/geckodriver-v0.27.0-win64/geckodriver.exe ./icomoon.json
./devicon.json ./icons ./ --headless --pr_title "%PR_TITLE%"
- name: Upload screenshots for comments
uses: actions/upload-artifact@v2
if: success()
with:
name: screenshots
path: ./screenshots/*.png
- name: Upload geckodriver.log for debugging purposes
uses: actions/upload-artifact@v2
if: failure()
with:
name: geckodriver-log
path: ./geckodriver.log