Skip to content

re-add linux/arm/v8 #53

re-add linux/arm/v8

re-add linux/arm/v8 #53

Workflow file for this run

name: Debian
on:
push:
paths:
- .github/workflows/debian.yml
- shell/**
- .dockerignore
- .ssh.sh
- debian.Dockerfile
pull_request:
paths:
- .github/workflows/debian.yml
- shell/**
- .dockerignore
- .ssh.sh
- debian.Dockerfile
jobs:
verify:
runs-on: ubuntu-latest
env:
DOCKER_BUILDKIT: "1"
steps:
- uses: actions/checkout@v4
- name: Build image
run: docker build -f debian.Dockerfile -t kbuley/basedevcontainer .
publish:
needs: [verify]
if: github.event_name == 'push'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
- uses: docker/login-action@v3
with:
username: kbuley
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- uses: docker/login-action@v3
with:
registry: quay.io
username: kbuley+github
password: ${{ secrets.QUAY_PASSWORD }}
- name: Set variables
id: vars
env:
EVENT_NAME: ${{ github.event_name }}
run: |
BRANCH=${GITHUB_REF#refs/heads/}
TAG=${GITHUB_REF#refs/tags/}
echo "commit=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
echo "create=$(date -u +%Y-%m-%dT%H:%M:%SZ)" >> $GITHUB_OUTPUT
if [ "$TAG" != "$GITHUB_REF" ]; then
echo "version=$TAG" >> $GITHUB_OUTPUT
echo "debian_version=$TAG-debian" >> $GITHUB_OUTPUT
echo "platforms=linux/amd64,linux/arm64" >> $GITHUB_OUTPUT
elif [ "$BRANCH" = "main" ]; then
echo "version=latest" >> $GITHUB_OUTPUT
echo "debian_version=debian" >> $GITHUB_OUTPUT
echo "platforms=linux/amd64,linux/arm64,linux/arm64/v8" >> $GITHUB_OUTPUT
else
echo "version=$BRANCH" >> $GITHUB_OUTPUT
echo "debian_version=$BRANCH-debian" >> $GITHUB_OUTPUT
echo "platforms=linux/amd64,linux/arm64,linux/arm64/v8" >> $GITHUB_OUTPUT
fi
- name: Build and push final image
uses: docker/build-push-action@v5
with:
file: debian.Dockerfile
platforms: ${{ steps.vars.outputs.platforms }}
build-args: |
CREATED=${{ steps.vars.outputs.created }}
COMMIT=${{ steps.vars.outputs.commit }}
VERSION=${{ steps.vars.outputs.version }}
tags: |
kbuley/basedevcontainer:${{ steps.vars.outputs.version }}
kbuley/basedevcontainer:${{ steps.vars.outputs.debian_version}}
quay.io/kbuley/basedevcontainer:${{ steps.vars.outputs.version }}
quay.io/kbuley/basedevcontainer:${{ steps.vars.outputs.debian_version }}
push: true