Skip to content

Update aclemons/slackware:current Docker digest to e70c682 #116

Update aclemons/slackware:current Docker digest to e70c682

Update aclemons/slackware:current Docker digest to e70c682 #116

---
name: Slackware -current Full Docker Image
on:
workflow_dispatch:
push:
branches:
- master
paths:
- full/current/**/*
- scripts/install_all.sh
concurrency:
group: docker-full-current-${{ github.head_ref || github.ref_name }}
cancel-in-progress: false
env:
REGISTRY_IMAGE: aclemons/slackware
# renovate: datasource=docker depName=nginx versioning=docker
NGINX_IMAGE_VERSION: 1.27.1@sha256:1540e37eebb9abc5afa4256de1bade6542d50bf69b61b1dd855cb7804aaaf444
jobs:
build-current:
runs-on: ubuntu-24.04
permissions:
packages: write
strategy:
fail-fast: false
matrix:
platform:
- linux/386
- linux/amd64
- linux/arm64/v8
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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
show-progress: false
- name: Set artifact name
run: |
if [ "${{ matrix.platform }}" = "linux/386" ] ; then
printf 'ARTIFACT_NAME=digests-386\n' >> "$GITHUB_ENV"
elif [ "${{ matrix.platform }}" = "linux/amd64" ] ; then
printf 'ARTIFACT_NAME=digests-amd64\n' >> "$GITHUB_ENV"
elif [ "${{ matrix.platform }}" = "linux/arm64/v8" ] ; then
printf 'ARTIFACT_NAME=digests-arm64\n' >> "$GITHUB_ENV"
else
echo "Unhandled platform ${{ matrix.platform }}"
exit 1
fi
- name: Docker meta
id: meta
uses: docker/metadata-action@369eb591f429131d6889c46b94e711f089e6ca96 # v5.6.1
with:
images: ${{ env.REGISTRY_IMAGE }}
tags: |
type=raw,value=current-full
- name: Set up QEMU
uses: docker/setup-qemu-action@53851d14592bedcffcf25ea515637cff71ef929a # v3.3.0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@6524bf65af31da8d45b59e8c27de4bd072b392f5 # v3.8.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-current"
elif [ "${{ matrix.platform }}" = "linux/amd64" ] ; then
dir="slackware64-current"
elif [ "${{ matrix.platform }}" = "linux/arm64/v8" ] ; then
dir="slackwareaarch64-current"
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@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}
- name: Login to Docker Hub
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push by digest
id: build
uses: docker/build-push-action@ca877d9245402d1537745e0e356eab47c3520991 # v6.13.0
with:
file: full/current/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@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
with:
name: ${{ env.ARTIFACT_NAME }}
path: /tmp/digests/*
if-no-files-found: error
retention-days: 1
merge-current:
runs-on: ubuntu-24.04
permissions:
packages: write
needs:
- build-current
steps:
- name: Download digests
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
pattern: digests-*
path: /tmp/digests
merge-multiple: true
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@6524bf65af31da8d45b59e8c27de4bd072b392f5 # v3.8.0
- name: Docker meta
id: meta
uses: docker/metadata-action@369eb591f429131d6889c46b94e711f089e6ca96 # v5.6.1
with:
images: ${{ env.REGISTRY_IMAGE }}
tags: |
type=raw,value=current-full
- name: Login to GitHub Container Registry
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}
- name: Login to Docker Hub
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.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 }}