name: Docker # This workflow uses actions that are not certified by GitHub. # They are provided by a third-party and are governed by # separate terms of service, privacy policy, and support # documentation. on: push: branches: [ "main" ] jobs: build: runs-on: ubuntu-latest permissions: contents: read packages: write steps: # https://github.com/docker/login-action - name: Log into ghcr if: github.event_name != 'pull_request' uses: docker/login-action@v2 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} # https://github.com/marketplace/actions/checkout - name: Checkout uses: actions/checkout@v3 - name: Build and push the container (amd64 only) run: | #!/bin/sh set -eux # sets a core_pattern so we get core files (in this case inside the container) sudo sh -c 'f=/proc/sys/kernel/core_pattern; cat "$f"; echo "core-%e.%p.%t" >"$f"; cat "$f"' for variant in \ unstable-musl \ 1.36-musl \ 1.35-musl \ 1.34-musl \ 1.33-musl \ 1.36-uclibc \ 1.35-uclibc \ 1.34-uclibc \ 1.33-uclibc \ 1.36-glibc \ 1.35-glibc \ 1.34-glibc \ 1.33-glibc \ ; do tag="ghcr.io/backplane/avxtest:${variant}-$(date '+%s')" docker build \ --progress=plain \ --platform linux/amd64 \ --build-arg "BASE=busybox:${variant}" \ --tag "$tag" \ . || continue docker push $tag done