Skip to content

Constrain conda build to a version which builds tarballs by default (… #11

Constrain conda build to a version which builds tarballs by default (…

Constrain conda build to a version which builds tarballs by default (… #11

name: Build and publish AlmaLinux 8 package builder images
on:
push:
branches:
- main
tags:
- 'pkg-build-alma-*'
paths:
- 'anaconda-pkg-build/linux/alma/Dockerfile'
- '.github/workflows/anaconda_pkg_build_linux_alma.yml'
pull_request:
paths:
- 'anaconda-pkg-build/linux/alma/Dockerfile'
- '.github/workflows/anaconda_pkg_build_linux_alma.yml'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Login to DockerHub
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags')
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to Public ECR
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags')
with:
registry: public.ecr.aws
username: ${{ secrets.AWS_ACCESS_KEY_ID }}
password: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
env:
AWS_REGION: us-east-1
- name: Set up QEMU
uses: docker/setup-qemu-action@5964de0df58d5ad28b04d8fe2e6b80ad47105b91 # v3.5.0
with:
# https://github.com/docker/setup-qemu-action/issues/188#issuecomment-2604322104
image: tonistiigi/binfmt:qemu-v8.1.5
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@f7ce87c1d6bead3e36075b2ce75da1f6cc28aaca # v3.9.0
with:
version: latest
driver-opts: network=host
- name: Docker meta
id: meta
uses: docker/metadata-action@369eb591f429131d6889c46b94e711f089e6ca96 # v5.6.1
with:
images: |
continuumio/anaconda-pkg-build
public.ecr.aws/y0o4y9o3/anaconda-pkg-build
tags: |
type=ref,event=branch,suffix=-almalinux-8
type=ref,event=pr,suffix=-almalinux-8
type=match,pattern=pkg-build-(.*),group=1,suffix=-almalinux-8
flavor: |
latest=false
- name: build-push pkg-builder
uses: docker/build-push-action@0adf9959216b96bec444f325f1e493d4aa344497 # v6.14.0
with:
context: ./anaconda-pkg-build/linux/alma
builder: ${{ steps.buildx.outputs.name }}
file: ./anaconda-pkg-build/linux/alma/Dockerfile
platforms: linux/amd64,linux/arm64/v8
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
push: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags') }}