-
Notifications
You must be signed in to change notification settings - Fork 2
44 lines (39 loc) · 1.22 KB
/
comment_size.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Comment APK Size
on:
workflow_run:
workflows: [ "Check Size" ]
types:
- completed
jobs:
comment-size:
name: Comment Size
runs-on: ubuntu-latest
if: >
${{ github.event.workflow_run.event == 'pull_request' &&
github.event.workflow_run.conclusion == 'success' }}
steps:
- uses: dawidd6/action-download-artifact@v2
with:
name: apk-size
workflow: ${{ github.event.workflow_run.workflow_id }}
- name: Check release size
run: |
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@v2
id: fc
with:
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@v3
with:
comment-id: ${{ steps.fc.outputs.comment-id }}
issue-number: ${{ steps.size.outputs.PR_NUMBER }}
body: |
APK Size: ${{ steps.size.outputs.APK_SIZE }}
edit-mode: replace