Skip to content

Commit

Permalink
Updated the workflow yaml to use the new repo
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas-Boi committed Dec 28, 2020
1 parent 426d950 commit 299daa7
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 20 deletions.
6 changes: 3 additions & 3 deletions .github/scripts/icomoon_peek.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
def main():
args = util.get_commandline_args()
new_icons = filehandler.find_new_icons(args.devicon_json_path, args.icomoon_json_path)
if len(new_icons) == 0:
print("No files need to be uploaded. Ending script...")
return
# if len(new_icons) == 0:
# print("No files need to be uploaded. Ending script...")
# return

# print list of new icons
print("List of new icons:", *new_icons, sep = "\n")
Expand Down
24 changes: 17 additions & 7 deletions .github/workflows/build_icons.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,32 @@ jobs:
with:
name: geckodriver-log
path: ./geckodriver.log
- name: Upload screenshot of the newly made icons
uses: actions/upload-artifact@v2
if: ${{success()}}
with:
name: new_icons
path: ./new_icons.png
- 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@v1
if: ${{success()}}
with:
img_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: 'Automated font-building task ran by GitHub Actions bot'
body: ${{ format(env.MESSAGE, steps.imgur_step.outputs.imgur_url ) }}
delete-branch: true
12 changes: 2 additions & 10 deletions .github/workflows/peek_icons.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
path: ./geckodriver.log
- name: Upload screenshot of the newly made icons
id: imgur_step
uses: Thomas-Boi/public-upload-to-imgur@v1
uses: devicons/public-upload-to-imgur@v1
if: ${{success()}}
with:
img_path: ./new_icons.png
Expand All @@ -39,24 +39,16 @@ jobs:
uses: github-actions-up-and-running/[email protected]
env:
IMG_URL: ${{ steps.imgur_step.outputs.imgur_url }}
MESSAGE: >
MESSAGE: |
Hi!
I'm Devicons' Peek Bot and I just peeked at the icons that you wanted to add using [icomoon.io](https://icomoon.io/app/#/select).
Here is the result below:
![Peeked Icons (top left)]({0})
Note: If the image doesn't show up, it's probably because it has been autodeleted by Imgur after 6 months due to our API choice.
Here is [the url]({1}).
The maintainers will now take a look at it and decide whether to merge your PR.
Cheers :),
Expand Down

0 comments on commit 299daa7

Please sign in to comment.