-
-
Notifications
You must be signed in to change notification settings - Fork 8
49 lines (42 loc) · 1.27 KB
/
build-docker-runner-python.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
45
46
47
48
49
name: Build Runner Docker Image Python
on:
workflow_call:
inputs:
python-version:
required: false
default: '3.9'
type: string
git-revision:
required: false
default: ${{ github.sha }}
type: string
jobs:
build-docker-runner-python-image:
name: Build runner-py docker image (Python ${{ inputs.python-version }})
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v3
with:
ref: ${{ inputs.git-revision }}
- name: Build image
run: docker build -t scramjetorg/runner-py:$(git rev-parse HEAD) -f Dockerfile ../../
working-directory: packages/python-runner
- name: Export image
run: >
docker images |
awk '/scramjet/{print $1,$2,$3}' |
sed 's|/| |' |
while read repo name tag id; do
docker save $repo/$name:$tag -o $repo-$name-$tag-docker-image.tar
done
- name: Install pigz and zip image
run: |
sudo apt-get install pigz -y
pigz *-docker-image.tar
- name: Upload image as an artifact
uses: actions/upload-artifact@v3
with:
name: runner-python-image
path: '*.tar.gz'
retention-days: 1