mirror of
https://github.com/konpa/devicon.git
synced 2025-08-19 04:41:41 +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
|
||||
steps:
|
||||
- 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'
|
||||
uses: cutenode/action-always-fail@v1.0.1
|
||||
|
||||
@@ -21,23 +20,23 @@ jobs:
|
||||
workflow: peek_icons.yml
|
||||
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()
|
||||
run: |
|
||||
echo 'PR_NUM<<EOF' >> $GITHUB_ENV
|
||||
cat ./pr_num/pr_num.txt >> $GITHUB_ENV
|
||||
echo 'EOF' >> $GITHUB_ENV
|
||||
id: pr_num_reader
|
||||
uses: juliangruber/read-file-action@v1.0.0
|
||||
with:
|
||||
path: ./pr_num/pr_num.txt
|
||||
|
||||
- name: Read the message file
|
||||
- name: Read the err message file
|
||||
if: success()
|
||||
id: message_reader
|
||||
id: err_message_reader
|
||||
uses: juliangruber/read-file-action@v1.0.0
|
||||
with:
|
||||
path: ./svg_err_messages/svg_err_messages.txt
|
||||
|
||||
- name: Comment on the PR about the result - Success
|
||||
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:
|
||||
MESSAGE: |
|
||||
Hi!
|
||||
@@ -49,13 +48,13 @@ jobs:
|
||||
SVG-Checker Bot :grin:
|
||||
with:
|
||||
type: create
|
||||
issue_number: ${{ env.PR_NUM }}
|
||||
issue_number: ${{ steps.pr_num_reader.outputs.content }}
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
body: ${{ env.MESSAGE }}
|
||||
|
||||
- name: Comment on the PR about the result - SVG Error
|
||||
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:
|
||||
MESSAGE: |
|
||||
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.
|
||||
with:
|
||||
type: create
|
||||
issue_number: ${{ env.PR_NUM }}
|
||||
issue_number: ${{ steps.pr_num_reader.outputs.content }}
|
||||
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
|
||||
uses: jungwinter/comment@v1 # let us comment on a specific PR
|
||||
@@ -96,6 +95,6 @@ jobs:
|
||||
SVG-Checker Bot :smile:
|
||||
with:
|
||||
type: create
|
||||
issue_number: ${{ env.PR_NUM }}
|
||||
issue_number: ${{ steps.pr_num_reader.outputs.content }}
|
||||
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
|
||||
run_id: ${{ github.event.workflow_run.id }}
|
||||
|
||||
- name: Get the PR number and save it in $PR_NUM
|
||||
run: |
|
||||
echo 'PR_NUM<<EOF' >> $GITHUB_ENV
|
||||
cat ./pr_num/pr_num.txt >> $GITHUB_ENV
|
||||
echo 'EOF' >> $GITHUB_ENV
|
||||
- name: Read the pr_num file
|
||||
if: success()
|
||||
id: pr_num_reader
|
||||
uses: juliangruber/read-file-action@v1.0.0
|
||||
with:
|
||||
path: ./pr_num/pr_num.txt
|
||||
|
||||
- name: Upload screenshot of the newly made icons gotten from the artifacts
|
||||
id: icons_overview_img_step
|
||||
@@ -68,7 +69,7 @@ jobs:
|
||||
Peek Bot :blush:
|
||||
with:
|
||||
type: create
|
||||
issue_number: ${{ env.PR_NUM }}
|
||||
issue_number: ${{ steps.pr_num_reader.outputs.content }}
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
body: ${{format(env.MESSAGE, env.OVERVIEW_IMG_MARKDOWN, env.DETAILED_IMGS_MARKDOWN)}}
|
||||
|
||||
@@ -93,6 +94,6 @@ jobs:
|
||||
Peek Bot :relaxed:
|
||||
with:
|
||||
type: create
|
||||
issue_number: ${{ env.PR_NUM }}
|
||||
issue_number: ${{ steps.pr_num_reader.outputs.content }}
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
body: ${{ env.MESSAGE }}
|
||||
|
Reference in New Issue
Block a user