Skip to content

fix: prune stopped containers after build #492

fix: prune stopped containers after build

fix: prune stopped containers after build #492

Workflow file for this run

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