mirror of
https://github.com/konpa/devicon.git
synced 2025-08-19 12:51:43 +02:00
Changed to file read action
This commit is contained in:
29
.github/workflows/post_check_svgs_comment.yml
vendored
29
.github/workflows/post_check_svgs_comment.yml
vendored
@@ -10,7 +10,6 @@ jobs:
|
|||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-18.04
|
||||||
steps:
|
steps:
|
||||||
- name: Check if the trigger run worked. If it failed, fail the current run.
|
- name: Check if the trigger run worked. If it failed, fail the current run.
|
||||||
# this is done cause this script should only post the err message if trigger run failed
|
|
||||||
if: success() && github.event.workflow_run.conclusion != 'success'
|
if: success() && github.event.workflow_run.conclusion != 'success'
|
||||||
uses: cutenode/action-always-fail@v1.0.1
|
uses: cutenode/action-always-fail@v1.0.1
|
||||||
|
|
||||||
@@ -21,23 +20,23 @@ jobs:
|
|||||||
workflow: peek_icons.yml
|
workflow: peek_icons.yml
|
||||||
run_id: ${{ github.event.workflow_run.id }}
|
run_id: ${{ github.event.workflow_run.id }}
|
||||||
|
|
||||||
- name: Get the PR number and save it in $PR_NUM
|
- name: Read the pr_num file
|
||||||
if: success()
|
if: success()
|
||||||
run: |
|
id: pr_num_reader
|
||||||
echo 'PR_NUM<<EOF' >> $GITHUB_ENV
|
uses: juliangruber/read-file-action@v1.0.0
|
||||||
cat ./pr_num/pr_num.txt >> $GITHUB_ENV
|
with:
|
||||||
echo 'EOF' >> $GITHUB_ENV
|
path: ./pr_num/pr_num.txt
|
||||||
|
|
||||||
- name: Read the message file
|
- name: Read the err message file
|
||||||
if: success()
|
if: success()
|
||||||
id: message_reader
|
id: err_message_reader
|
||||||
uses: juliangruber/read-file-action@v1.0.0
|
uses: juliangruber/read-file-action@v1.0.0
|
||||||
with:
|
with:
|
||||||
path: ./svg_err_messages/svg_err_messages.txt
|
path: ./svg_err_messages/svg_err_messages.txt
|
||||||
|
|
||||||
- name: Comment on the PR about the result - Success
|
- name: Comment on the PR about the result - Success
|
||||||
uses: jungwinter/comment@v1 # let us comment on a specific PR
|
uses: jungwinter/comment@v1 # let us comment on a specific PR
|
||||||
if: success() && steps.message_reader.outputs.content == 'None'
|
if: success() && steps.err_message_reader.outputs.content == 'None'
|
||||||
env:
|
env:
|
||||||
MESSAGE: |
|
MESSAGE: |
|
||||||
Hi!
|
Hi!
|
||||||
@@ -49,13 +48,13 @@ jobs:
|
|||||||
SVG-Checker Bot :grin:
|
SVG-Checker Bot :grin:
|
||||||
with:
|
with:
|
||||||
type: create
|
type: create
|
||||||
issue_number: ${{ env.PR_NUM }}
|
issue_number: ${{ steps.pr_num_reader.outputs.content }}
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
body: ${{ env.MESSAGE }}
|
body: ${{ env.MESSAGE }}
|
||||||
|
|
||||||
- name: Comment on the PR about the result - SVG Error
|
- name: Comment on the PR about the result - SVG Error
|
||||||
uses: jungwinter/comment@v1 # let us comment on a specific PR
|
uses: jungwinter/comment@v1 # let us comment on a specific PR
|
||||||
if: success() && steps.message_reader.outputs.content != 'None'
|
if: success() && steps.err_message_reader.outputs.content != 'None'
|
||||||
env:
|
env:
|
||||||
MESSAGE: |
|
MESSAGE: |
|
||||||
Hi!
|
Hi!
|
||||||
@@ -77,9 +76,9 @@ jobs:
|
|||||||
PS. One day, I will be smart enough to fix these errors for you :persevere:. Until then, I can only point them out.
|
PS. One day, I will be smart enough to fix these errors for you :persevere:. Until then, I can only point them out.
|
||||||
with:
|
with:
|
||||||
type: create
|
type: create
|
||||||
issue_number: ${{ env.PR_NUM }}
|
issue_number: ${{ steps.pr_num_reader.outputs.content }}
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
body: ${{ format(env.MESSAGE, steps.message_reader.outputs.content) }}
|
body: ${{ format(env.MESSAGE, steps.err_message_reader.outputs.content) }}
|
||||||
|
|
||||||
- name: Comment on the PR about the result - Failure
|
- name: Comment on the PR about the result - Failure
|
||||||
uses: jungwinter/comment@v1 # let us comment on a specific PR
|
uses: jungwinter/comment@v1 # let us comment on a specific PR
|
||||||
@@ -96,6 +95,6 @@ jobs:
|
|||||||
SVG-Checker Bot :smile:
|
SVG-Checker Bot :smile:
|
||||||
with:
|
with:
|
||||||
type: create
|
type: create
|
||||||
issue_number: ${{ env.PR_NUM }}
|
issue_number: ${{ steps.pr_num_reader.outputs.content }}
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
body: ${{ format(env.MESSAGE, env.SVG_ERR_MSGS)}}
|
body: ${{ env.MESSAGE }}
|
||||||
|
15
.github/workflows/post_peek_screenshot.yml
vendored
15
.github/workflows/post_peek_screenshot.yml
vendored
@@ -20,11 +20,12 @@ jobs:
|
|||||||
workflow: peek_icons.yml
|
workflow: peek_icons.yml
|
||||||
run_id: ${{ github.event.workflow_run.id }}
|
run_id: ${{ github.event.workflow_run.id }}
|
||||||
|
|
||||||
- name: Get the PR number and save it in $PR_NUM
|
- name: Read the pr_num file
|
||||||
run: |
|
if: success()
|
||||||
echo 'PR_NUM<<EOF' >> $GITHUB_ENV
|
id: pr_num_reader
|
||||||
cat ./pr_num/pr_num.txt >> $GITHUB_ENV
|
uses: juliangruber/read-file-action@v1.0.0
|
||||||
echo 'EOF' >> $GITHUB_ENV
|
with:
|
||||||
|
path: ./pr_num/pr_num.txt
|
||||||
|
|
||||||
- name: Upload screenshot of the newly made icons gotten from the artifacts
|
- name: Upload screenshot of the newly made icons gotten from the artifacts
|
||||||
id: icons_overview_img_step
|
id: icons_overview_img_step
|
||||||
@@ -68,7 +69,7 @@ jobs:
|
|||||||
Peek Bot :blush:
|
Peek Bot :blush:
|
||||||
with:
|
with:
|
||||||
type: create
|
type: create
|
||||||
issue_number: ${{ env.PR_NUM }}
|
issue_number: ${{ steps.pr_num_reader.outputs.content }}
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
body: ${{format(env.MESSAGE, env.OVERVIEW_IMG_MARKDOWN, env.DETAILED_IMGS_MARKDOWN)}}
|
body: ${{format(env.MESSAGE, env.OVERVIEW_IMG_MARKDOWN, env.DETAILED_IMGS_MARKDOWN)}}
|
||||||
|
|
||||||
@@ -93,6 +94,6 @@ jobs:
|
|||||||
Peek Bot :relaxed:
|
Peek Bot :relaxed:
|
||||||
with:
|
with:
|
||||||
type: create
|
type: create
|
||||||
issue_number: ${{ env.PR_NUM }}
|
issue_number: ${{ steps.pr_num_reader.outputs.content }}
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
body: ${{ env.MESSAGE }}
|
body: ${{ env.MESSAGE }}
|
||||||
|
Reference in New Issue
Block a user