-
Notifications
You must be signed in to change notification settings - Fork 56
40 lines (38 loc) · 1.06 KB
/
check-image-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
name: Check Image Size
on:
# Manually call
workflow_dispatch:
inputs:
image-version:
required: true
description: Image version=
# Call from other workflow
workflow_call:
inputs:
image-version:
type: string
required: true
defaults:
run:
shell: bash -l {0}
jobs:
check-image-size:
name: Run image size check
runs-on: ubuntu-latest
if: endsWith(github.repository, '/sagemaker-distribution')
permissions:
pull-requests: write
contents: write
steps:
- uses: actions/checkout@v4
- uses: mamba-org/setup-micromamba@v1
with:
environment-file: ./environment.yml
environment-name: sagemaker-distribution
init-shell: bash
- name: Free up disk space
run: rm -rf /opt/hostedtoolcache
- name: Activate sagemaker-distribution
run: micromamba activate sagemaker-distribution
- name: Run size validation
run: python ./src/main.py generate-size-report --target-patch-version ${{ inputs.image-version }} --validate