1
0
mirror of https://github.com/konpa/devicon.git synced 2025-02-24 17:22:28 +01:00
devicon/.github/workflows/build_icons.yml
2020-12-30 13:21:35 -08:00

61 lines
2.1 KiB
YAML

name: Build Icons
on: workflow_dispatch
jobs:
build:
name: Get Fonts From Icomoon
runs-on: windows-2019
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
repository: ${{ github.event.pull_request.head.repo.full_name}}
- name: Setup Python v3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies (python, pip, npm)
run: |
python -m pip install --upgrade pip
pip install -r ./.github/scripts/requirements.txt
npm install
- name: Executing build and create fonts via icomoon
run: >
python ./.github/scripts/icomoon_build.py
./.github/scripts/build_assets/geckodriver-v0.27.0-win64/geckodriver.exe ./icomoon.json
./devicon.json ./icons ./ --headless
- name: Upload geckodriver.log for debugging purposes
uses: actions/upload-artifact@v2
if: failure()
with:
name: geckodriver-log
path: ./geckodriver.log
- name: Build devicon.min.css
if: success()
run: npm run build-css
- name: Upload screenshot of the newly made icons
id: imgur_step
uses: devicons/public-upload-to-imgur@v2
if: success()
with:
path: ./new_icons.png
client_id: ${{secrets.IMGUR_CLIENT_ID}}
- name: Create Pull Request
if: success()
uses: peter-evans/create-pull-request@v3
env:
MESSAGE: |
Automated font-building task ran by GitHub Actions bot. This PR built new font files and devicon.css file.
Here are all the files that were built:
![Files Built]({0})
More information can be found in the GitHub Action logs for this workflow.
with:
branch: 'master-build-result'
base: 'master'
commit-message: 'Built new icons, icomoon.json and devicon.css'
title: 'bot:build new icons, icomoon.json and devicon.css'
body: ${{ format(env.MESSAGE, fromJSON(steps.imgur_step.outputs.imgur_url)[0] ) }}
delete-branch: true