-
Notifications
You must be signed in to change notification settings - Fork 133
63 lines (56 loc) · 1.71 KB
/
build-image.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: Build image
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
pull_request:
paths-ignore:
- '.circleci/**'
- 'docs/**'
- 'test/**'
jobs:
build:
name: Build image
runs-on: ubuntu-20.04
strategy:
matrix:
include:
- arch: arm64
image: bioconda-utils-build-env-cos7-aarch64
base_image: quay.io/condaforge/linux-anvil-aarch64
- arch: amd64
image: bioconda-utils-build-env-cos7
base_image: quay.io/condaforge/linux-anvil-cos7-x86_64
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- id: get-tag
run: |
tag=${{ github.event.release && github.event.release.tag_name || github.sha }}
# https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
# printf %s "::set-output name=tag::${tag#v}"
printf %s "tag=${tag#v}" >> $GITHUB_OUTPUT
- name: Install qemu dependency
run: |
sudo apt-get update
sudo apt-get install -y qemu-user-static
- name: Build image
id: buildah-build
uses: redhat-actions/buildah-build@v2
with:
image: ${{ matrix.image }}
arch: ${{ matrix.arch }}
build-args: |
BASE_IMAGE=${{ matrix.base_image }}
tags: >-
latest
${{ steps.get-tag.outputs.tag }}
dockerfiles: |
./Dockerfile
- name: Test built image
run: |
image='${{ steps.buildah-build.outputs.image }}'
for tag in ${{ steps.buildah-build.outputs.tags }} ; do
podman run --rm "${image}:${tag}" bioconda-utils --version
done