-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
38 changed files
with
607 additions
and
161 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -213,20 +213,20 @@ def get_added_modified_svgs(files_added_json_path: str, | |
Get the svgs added and modified from the files_changed_json_path. | ||
:param: files_added_json_path, the path to the files_added.json created by the [email protected] | ||
:param: files_modified_json_path, the path to the files_modified.json created by the [email protected] | ||
:return: a list of the svg file paths that were added/modified in this pr as Path. | ||
:return: a list of the svg file paths that were added/modified in this pr as Path. It will only return icons in /icons path (see https://github.com/devicons/devicon/issues/505) | ||
""" | ||
files_added = get_json_file_content(files_added_json_path) | ||
files_modified = get_json_file_content(files_modified_json_path) | ||
|
||
svgs = [] | ||
for file in files_added: | ||
path = Path(file) | ||
if path.suffix.lower() == ".svg": | ||
if path.suffix.lower() == ".svg" and path.as_posix().lower().startswith('icons/'): | ||
svgs.append(path) | ||
|
||
for file in files_modified: | ||
path = Path(file) | ||
if path.suffix.lower() == ".svg": | ||
if path.suffix.lower() == ".svg" and path.as_posix().lower().startswith('icons/'): | ||
svgs.append(path) | ||
|
||
return svgs | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
on: | ||
release: | ||
types: [released] | ||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
# "ref" specifies the branch to check out. | ||
# "github.event.release.target_commitish" is a global variable and specifies the branch the release targeted | ||
ref: ${{ github.event.release.target_commitish }} | ||
- name: Use Node.js 12 | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 12 | ||
registry-url: https://registry.npmjs.org/ # Specifies the registry, this field is required! | ||
- run: npm ci | ||
- run: npm publish | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTOMATION_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,16 +5,17 @@ on: | |
types: | ||
- completed | ||
jobs: | ||
post_screenshots_in_comment: | ||
name: Post the screenshot | ||
post_result_of_svg_check: | ||
name: Post the result of the Check SVG Action | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- name: Check if the trigger run worked. If it failed, fail the current run. | ||
if: success() && github.event.workflow_run.conclusion != 'success' | ||
if: github.event.workflow_run.conclusion != 'success' | ||
uses: cutenode/[email protected] | ||
|
||
- name: Download workflow artifact | ||
uses: dawidd6/[email protected] | ||
if: success() | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
workflow: peek_icons.yml | ||
|
@@ -36,13 +37,11 @@ jobs: | |
|
||
- name: Comment on the PR about the result - Success | ||
uses: jungwinter/comment@v1 # let us comment on a specific PR | ||
if: success() && steps.err_message_reader.outputs.content == 'None' | ||
if: success() && steps.err_message_reader.outputs.content == '1' | ||
env: | ||
MESSAGE: | | ||
Hi! | ||
I'm Devicons' SVG-Checker Bot and I just checked all the SVGs in this branch. | ||
Everything looks great. Good job! | ||
I'm Devicons' SVG-Checker Bot and everything looks great. Good job! | ||
Have a nice day, | ||
SVG-Checker Bot :grin: | ||
|
@@ -54,7 +53,7 @@ jobs: | |
|
||
- name: Comment on the PR about the result - SVG Error | ||
uses: jungwinter/comment@v1 # let us comment on a specific PR | ||
if: success() && steps.err_message_reader.outputs.content != 'None' | ||
if: success() && (steps.err_message_reader.outputs.content != '0' || steps.err_message_reader.outputs.content != '1') | ||
env: | ||
MESSAGE: | | ||
Hi! | ||
|
@@ -82,7 +81,7 @@ jobs: | |
|
||
- name: Comment on the PR about the result - Failure | ||
uses: jungwinter/comment@v1 # let us comment on a specific PR | ||
if: failure() || cancelled() | ||
if: failure() | ||
env: | ||
MESSAGE: | | ||
Hi! | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.