Skip to content

Update aclemons/slackware:15.0 Docker digest to 7e1c965 (#114) #36

Update aclemons/slackware:15.0 Docker digest to 7e1c965 (#114)

Update aclemons/slackware:15.0 Docker digest to 7e1c965 (#114) #36

---
name: Slackware 15.0 Full Docker Image
on:
workflow_dispatch:
push:
branches:
- master
paths:
- full/15.0/**/*
- scripts/install_all.sh
concurrency:
group: docker-full-15.0-${{ github.head_ref || github.ref_name }}
cancel-in-progress: false
env:
REGISTRY_IMAGE: aclemons/slackware
# renovate: datasource=docker depName=nginx
NGINX_IMAGE_VERSION: 1.25.1-alpine3.17-slim@sha256:4b66d0cb3c4d314ed566b1d3ba0b95b9cfbb7b811cbbd54dda6e432a8fe0d7e4
jobs:
build-stable:
runs-on: ubuntu-22.04
permissions:
packages: write
strategy:
fail-fast: false
matrix:
platform:
- linux/386
- linux/amd64
- linux/arm/v7
steps:
- name: Maximise disc space
run: |
df -h
printf '\n'
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/ghc
sudo rm -rf /opt/hostedtoolcache/CodeQL
sudo docker image prune --all --force
printf '\n'
df -h
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
show-progress: false
- name: Docker meta
id: meta
uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 # v5.0.0
with:
images: ${{ env.REGISTRY_IMAGE }}
tags: |
type=raw,value=15.0-full
type=raw,value=latest-full
- name: Set up QEMU
uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3.0.0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0
with:
driver-opts: |
network=host
- name: Sync mirror
run: |
docker run -d --rm -v "$(pwd)/local_mirrors:/usr/share/nginx/html:ro" -p 3000:80 --name mirror nginx:${{ env.NGINX_IMAGE_VERSION }}
dir=""
if [ "${{ matrix.platform }}" = "linux/386" ] ; then
dir="slackware-15.0"
elif [ "${{ matrix.platform }}" = "linux/amd64" ] ; then
dir="slackware64-15.0"
elif [ "${{ matrix.platform }}" = "linux/arm/v7" ] ; then
dir="slackwarearm-15.0"
else
echo "Unhandled platform ${{ matrix.platform }}"
exit 1
fi
# check that the mirror is working
./scripts/sync_local_mirror.sh "$dir"
curl -s -f "http://localhost:3000/$dir/ChangeLog.txt" -o /dev/null
curl --head "http://localhost:3000/$dir/ChangeLog.txt"
- name: Login to GitHub Container Registry
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}
- name: Login to Docker Hub
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push by digest
id: build
uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0
with:
file: full/15.0/Dockerfile
context: .
platforms: ${{ matrix.platform }}
labels: ${{ steps.meta.outputs.labels }}
outputs: type=image,name=${{ env.REGISTRY_IMAGE }},push-by-digest=true,name-canonical=true,push=true
network: host
build-args: |
mirror_base=http://localhost:3000
- name: Export digest
run: |
mkdir -p /tmp/digests
digest="${{ steps.build.outputs.digest }}"
touch "/tmp/digests/${digest#sha256:}"
- name: Upload digest
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
with:
name: digests
path: /tmp/digests/*
if-no-files-found: error
retention-days: 1
merge-stable:
runs-on: ubuntu-22.04
permissions:
packages: write
needs:
- build-stable
steps:
- name: Download digests
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
with:
name: digests
path: /tmp/digests
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0
- name: Docker meta
id: meta
uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 # v5.0.0
with:
images: ${{ env.REGISTRY_IMAGE }}
tags: |
type=raw,value=15.0-full
type=raw,value=latest-full
- name: Login to GitHub Container Registry
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}
- name: Login to Docker Hub
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Create manifest list and push
working-directory: /tmp/digests
run: |
# shellcheck disable=SC2046
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
$(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *)
- name: Inspect image
run: |
docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${{ steps.meta.outputs.version }}