Repository navigation
66 lines (61 loc) · 1.95 KB
/
Copy pathdev-docker.yaml
File metadata and controls
66 lines (61 loc) · 1.95 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
name: dev-docker
on:
workflow_dispatch:
inputs:
distro:
description: 'Distribution to build (e.g. moshpit, pathogenome)'
required: true
type: string
epoch:
description: 'Epoch to build from (leave empty to use active epoch from data.yaml)'
required: false
type: string
workflow_call:
inputs:
distro:
description: 'Distribution to build (e.g. moshpit, pathogenome)'
required: true
type: string
epoch:
description: 'Epoch to build from (leave empty to use active epoch from data.yaml)'
required: false
type: string
jobs:
build:
name: Build and push ${{ inputs.distro }} dev image
runs-on: ubuntu-latest
steps:
- uses: qiime2/action-library-packaging/clean-disk@beta
name: 'Clean disk on linux'
- uses: actions/checkout@v4
- name: 'Get active epoch'
id: get-epoch
run: |
if [ -n '${{ inputs.epoch }}' ]; then
echo "epoch=${{ inputs.epoch }}" >> $GITHUB_OUTPUT
else
echo "epoch=$(python3 -c "
import yaml
print(yaml.safe_load(open('data.yaml'))['active_epoch'])
")" >> $GITHUB_OUTPUT
fi
- name: 'Build ${{ inputs.distro }} dev image'
id: build-image
uses: qiime2-cutlery/buildah-build@v2
with:
containerfiles: |
./Dockerfile.base
build-args: |
EPOCH=${{ steps.get-epoch.outputs.epoch }}
DISTRO=${{ inputs.distro }}
DISTRO_SUBDIR=passed
image: ${{ inputs.distro }}
tags: dev
- name: 'Push to quay.io'
uses: qiime2-cutlery/push-to-registry@v2
with:
image: ${{ steps.build-image.outputs.image }}
tags: ${{ steps.build-image.outputs.tags }}
registry: quay.io/qiime2
username: qiime2+q2d2
password: ${{ secrets.QUAY_IO_REGISTRY_TOKEN }}