Skip to content
This repository was archived by the owner on Jan 25, 2023. It is now read-only.

Commit 3b3774b

Browse files
committed
Use separate action
1 parent acd7c06 commit 3b3774b

File tree

1 file changed

+9
-26
lines changed

1 file changed

+9
-26
lines changed

.github/workflows/checksize.yml

Lines changed: 9 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,18 @@
1-
name: Check-Size
2-
1+
name: Image
32
on: push
43

54
jobs:
6-
check-size:
7-
name: Check image size
5+
Build:
86
runs-on: ubuntu-latest
97

108
steps:
119
- uses: actions/checkout@v2
1210
- name: Build Docker image
1311
run: docker build . --file Dockerfile.dummy --build-arg NF_IMAGE_VERSION=$GITHUB_SHA -t netlify/build:$GITHUB_SHA
14-
- name: Check image size
15-
run: |
16-
docker pull netlify/build:latest
17-
OLD=$(docker image inspect netlify/build:latest --format='{{.Size}}')
18-
NEW=$(docker image inspect netlify/build:$GITHUB_SHA --format='{{.Size}}')
19-
if (( NEW > OLD )); then
20-
MSG="PR image is $(expr $NEW / $OLD)% larger than default"
21-
else
22-
MSG="PR image is $(expr $OLD / $NEW)% smaller than default"
23-
fi
24-
curl -d '{"name":"Image size", "head_sha":"${{ github.sha }}", "conclusion":"neutral", "output":{"title":"'$MSG'", "summary":"foo"}}' \
25-
-H 'Content-Type: application/json' \
26-
-H 'Authorization: token ${{ secrets.GITHUB_TOKEN }}' \
27-
-X POST https://api.github.com/repos/${{ github.repository }}/check-runs
28-
# - uses: LouisBrunner/checks-action@v1.1.1
29-
# if: always()
30-
# with:
31-
# token: ${{ secrets.GITHUB_TOKEN }}
32-
# name: Test XYZ
33-
# conclusion: neutral
34-
# output: |
35-
# {"title":"Size is ${{ steps.size.outputs.size }}", "summary": "ok"}
12+
- name: Pull Xenial
13+
run: docker pull netlify/build:xenial
14+
- uses: vbrown608/whalescale@main
15+
with:
16+
token: ${{ secrets.GITHUB_TOKEN }}
17+
currentTag: netlify/build:${{ github.sha }}
18+
defaultTag: netlify/build:xenial

0 commit comments

Comments
 (0)