Skip to content

Build Multi-arch Image #81

Build Multi-arch Image

Build Multi-arch Image #81

Workflow file for this run

name: Build Multi-arch Image
on:
workflow_dispatch:
branches:
- main
schedule:
# * is a special character in YAML so you have to quote this string
- cron: "0 0 * * 0"
push:
paths-ignore:
- "**.md"
- ".github/**"
jobs:
build:
name: Build image
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: "Set current date as env variable"
run: |
echo "builddate=$(date +'%Y%m%d')" >> $GITHUB_OUTPUT
id: date # this is used on variable path
- id: version
name: "Set DUO APP Version env"
run: |
echo "version=$(curl https://dl.duosecurity.com/authproxy_version.json | jq -r '.releases | keys | max')" >> $GITHUB_OUTPUT
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: "arm64"
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to container registry
uses: docker/login-action@v3
with:
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_TOKEN }}
registry: docker.io
- name: Build and Push Image Debian
uses: docker/build-push-action@v6
with:
tags: oliverl21/duo-auth-proxy:latest,oliverl21/duo-auth-proxy:${{ steps.version.outputs.version }}-${{ steps.date.outputs.builddate }}
file: ./dockerfile-debian
platforms: linux/amd64,linux/arm64
push: true
cache-from: "type=gha,scope=debian"
cache-to: "type=gha,mode=max,scope=debian"
build-args: |
DUOVERSION=${{ steps.version.outputs.version }}
- name: Build and Push Image Alma
uses: docker/build-push-action@v6
with:
tags: oliverl21/duo-auth-proxy:latest-alma,oliverl21/duo-auth-proxy:${{ steps.version.outputs.version }}-alma-${{ steps.date.outputs.builddate }}
file: ./dockerfile-alma
platforms: linux/amd64,linux/arm64
push: true
cache-from: "type=gha,scope=alma"
cache-to: "type=gha,mode=max,scope=alma"
build-args: |
DUOVERSION=${{ steps.version.outputs.version }}