Update aclemons/slackware:15.0 Docker digest to acce114 #69
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
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 versioning=docker | |
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@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 | |
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/arm/v7" ] ; then | |
printf 'ARTIFACT_NAME=digests-arm\n' >> "$GITHUB_ENV" | |
else | |
echo "Unhandled platform ${{ matrix.platform }}" | |
exit 1 | |
fi | |
- name: Docker meta | |
id: meta | |
uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v5.5.1 | |
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@d70bba72b1f3fd22344832f00baa16ece964efeb # v3.3.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@0d4c9c5ea7693da7b068278f7b52bda2a190a446 # v3.2.0 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ github.token }} | |
- name: Login to Docker Hub | |
uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446 # v3.2.0 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and push by digest | |
id: build | |
uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0 # v5.3.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@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 | |
with: | |
name: ${{ env.ARTIFACT_NAME }} | |
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@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7 | |
with: | |
pattern: digests-* | |
path: /tmp/digests | |
merge-multiple: true | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3.3.0 | |
- name: Docker meta | |
id: meta | |
uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v5.5.1 | |
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@0d4c9c5ea7693da7b068278f7b52bda2a190a446 # v3.2.0 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ github.token }} | |
- name: Login to Docker Hub | |
uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446 # v3.2.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 }} |