-
Notifications
You must be signed in to change notification settings - Fork 2
73 lines (56 loc) · 2.07 KB
/
desc-python-matrix.yml
File metadata and controls
73 lines (56 loc) · 2.07 KB
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: desc-python create all versions
on:
# push:
# branches:
# - master
workflow_dispatch:
# schedule:
# - cron: '45 20 * * 0'
#env:
# TEST_TAG: lsstdesc/desc-python:ci-dev
jobs:
build:
name: Build on Ubuntu
runs-on: ubuntu-20.04
strategy:
matrix:
os: [18.04, 20.04, 22.04]
python-version: [py37, py38, py39]
fail-fast: false
env:
TEST_TAG: lsstdesc/desc-python-ubuntu-${{ matrix.os }}-${{ matrix.python-version }}:ci-dev
steps:
- name: Docker login
uses: docker/login-action@v1
with:
username: heather999
password: '${{ secrets.DOCKERHUB_ACCESSTOK }}'
- name: checkout desc-python
uses: actions/checkout@v3
with:
fetch-depth: 0
- name : Get date
run: |
echo "DATE_TAG=$(date "+%F")" >> $GITHUB_ENV
echo $GITHUB_WORKSPACE
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
- name: Build
id: docker_build
uses: docker/build-push-action@v2
with:
context: ./docker
build-args: |
GH_SHA=${{ github.sha }}
OS_VER=${{ matrix.os }}
PY_VER=${{ matrix.python-version }}
push: true
tags: ${{ env.TEST_TAG }}
- name: test image before pushing
run: |
docker run --rm ${{ env.TEST_TAG }} /bin/bash -c "python -c 'import astropy'"
docker tag ${{ env.TEST_TAG }} lsstdesc/desc-python-ubuntu-${{ matrix.os }}-${{ matrix.python-version }}:ci-${{env.DATE_TAG}}
docker push lsstdesc/desc-python-ubuntu-${{ matrix.os}}-${{ matrix.python-version }}:ci-${{env.DATE_TAG}}
docker tag lsstdesc/desc-python-ubuntu-${{ matrix.os }}-${{ matrix.python-version }}:ci-${{env.DATE_TAG}} lsstdesc/desc-python-ubuntu-${{ matrix.os }}-${{ matrix.python-version }}:ci
docker push lsstdesc/desc-python-ubuntu-${{ matrix.os }}-${{ matrix.python-version }}:ci