mirror of
https://github.com/ouchadam/small-talk.git
synced 2025-01-09 00:27:27 +01:00
using 3rd party download artifact action to allow downloading artifacts from the current workflow
This commit is contained in:
parent
fb878375cd
commit
fd4566c234
7
.github/workflows/check_size.yml
vendored
7
.github/workflows/check_size.yml
vendored
@ -38,11 +38,16 @@ jobs:
|
||||
echo "$(pwd)/bin" >> $GITHUB_PATH
|
||||
|
||||
- name: Save Size
|
||||
env:
|
||||
PULL_REQUEST_NUMBER: ${{ github.event.pull_request.number }}
|
||||
run: |
|
||||
mkdir -p ./apk_size
|
||||
echo $(./tools/check-size.sh | tail -1 | cut -d ',' -f2-) > ./apk_size/size.txt
|
||||
echo $PULL_REQUEST_NUMBER > ./apk_size/pr_number.txt
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: apk-size
|
||||
path: apk_size/size.txt
|
||||
path: |
|
||||
apk_size/size.txt
|
||||
apk_size/pr_number.txt
|
||||
retention-days: 5
|
||||
|
12
.github/workflows/comment_size.yml
vendored
12
.github/workflows/comment_size.yml
vendored
@ -15,28 +15,30 @@ jobs:
|
||||
github.event.workflow_run.conclusion == 'success' }}
|
||||
|
||||
steps:
|
||||
- uses: actions/download-artifact@v3
|
||||
- uses: dawidd6/action-download-artifact@v2
|
||||
with:
|
||||
name: apk-size
|
||||
path: ~/apk-size.txt
|
||||
workflow: ${{ github.event.workflow_run.workflow_id }}
|
||||
|
||||
- name: Check release size
|
||||
run: |
|
||||
echo "::set-output name=APK_SIZE::$(cat ~/apk-size.txt)"
|
||||
ls -R
|
||||
echo "::set-output name=APK_SIZE::$(cat size.txt)"
|
||||
echo "::set-output name=PR_NUMBER::$(cat pr_number.txt)"
|
||||
id: size
|
||||
|
||||
- name: Find Comment
|
||||
uses: peter-evans/find-comment@v1
|
||||
id: fc
|
||||
with:
|
||||
issue-number: ${{ github.event.pull_request.number }}
|
||||
issue-number: ${{ steps.size.outputs.PR_NUMBER }}
|
||||
comment-author: 'github-actions[bot]'
|
||||
body-includes: APK Size
|
||||
- name: Publish size to PR
|
||||
uses: peter-evans/create-or-update-comment@v1
|
||||
with:
|
||||
comment-id: ${{ steps.fc.outputs.comment-id }}
|
||||
issue-number: ${{ github.event.pull_request.number }}
|
||||
issue-number: ${{ steps.size.outputs.PR_NUMBER }}
|
||||
body: |
|
||||
APK Size: ${{ steps.size.outputs.APK_SIZE }}
|
||||
edit-mode: replace
|
Loading…
Reference in New Issue
Block a user