-
-
Notifications
You must be signed in to change notification settings - Fork 142
35 lines (31 loc) · 941 Bytes
/
test-docker.yml
File metadata and controls
35 lines (31 loc) · 941 Bytes
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
name: Build Docker Image
on:
pull_request:
branches:
- dev
paths:
- "Dockerfile"
jobs:
build:
name: Build Docker Container
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.9]
env:
IMAGE: openmined/pydp
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Show python version and build image name
id: build_name
run: |
python -c "import sys; print(sys.version)"
echo "::set-output name=image_name::${IMAGE}-${GITHUB_REF##*/}-${{matrix.python-version}}"
- name: Build images
run: docker build -t ${{steps.build_name.outputs.image_name}} --build-arg PYTHON_VERSION=${{matrix.python-version}} -f Dockerfile .