Skip to content

Change tags in DOCKERHUB.md and README.md #38

Change tags in DOCKERHUB.md and README.md

Change tags in DOCKERHUB.md and README.md #38

Workflow file for this run

name: Build
on:
push:
branches:
- develop
- main
paths:
- 'latest/**'
- 'official/**'
- .github/workflows/build.yml
- versions.json
workflow_dispatch:
env:
DOCKERHUB_REPOSITORY: ${{ github.repository_owner }}/ktools
SLACK_CHANNEL: ${{ secrets.SLACK_CHANNEL }}
SLACK_SIGNING_SECRET: ${{ secrets.SLACK_SIGNING_SECRET }}
SLACK_TOKEN: ${{ secrets.SLACK_TOKEN }}
jobs:
prepare:
runs-on: ubuntu-latest
outputs:
latest: ${{ steps.set-matrix.outputs.latest }}
official: ${{ steps.set-matrix.outputs.official }}
steps:
- name: Check out
uses: actions/checkout@v4
- name: Set matrix
id: set-matrix
run: |
JSON=$(cat ./versions.json)
echo "latest=$(jq -cM .latest <<< $JSON)" >> $GITHUB_OUTPUT
echo "official=$(jq -cM .official <<< $JSON)" >> $GITHUB_OUTPUT
official:
needs: prepare
runs-on: ubuntu-latest
strategy:
max-parallel: 1
matrix:
image: ${{ fromJSON(needs.prepare.outputs.official) }}
steps:
- name: Check out
uses: actions/checkout@v4
- name: Send Slack notification
uses: codedsolar/slack-action@v1
if: ${{ github.event_name != 'pull_request' }}
id: slack
with:
fields: |
{STATUS}
{REF}
ImageMagick version: ${{ matrix.image.imagemagick_version }}
ktools version: ${{ matrix.image.version }}
status: in-progress
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
if: ${{ github.event_name != 'pull_request' }}
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GHCR
uses: docker/login-action@v3
if: ${{ github.event_name != 'pull_request' }}
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GHCR_TOKEN }}
- name: Prepare Docker meta for a Debian image
uses: docker/metadata-action@v5
id: debian-meta
with:
flavor: prefix=official-,onlatest=true
images: |
${{ env.DOCKERHUB_REPOSITORY }}
ghcr.io/${{ env.DOCKERHUB_REPOSITORY }}
labels: [email protected]
tags: |
type=raw,value=${{ matrix.image.version }}-imagemagick-${{ matrix.image.imagemagick_version }}-debian
type=raw,value=${{ matrix.image.version }}-debian
type=raw,value=${{ matrix.image.version }}
${{ matrix.image.latest && 'type=raw,value=debian' || '' }}
- name: Build a Debian image
uses: docker/build-push-action@v5
id: debian
with:
build-args: |
DS_KTOOLS_VERSION=${{ matrix.image.version }}
IMAGEMAGICK_IMAGE_PREFIX=${{ matrix.image.imagemagick_legacy && 'legacy-' || '' }}
IMAGEMAGICK_VERSION=${{ matrix.image.imagemagick_version }}
cache-from: type=registry,ref=${{ env.DOCKERHUB_REPOSITORY }}:official-${{ matrix.image.version }}-imagemagick-${{ matrix.image.imagemagick_version }}-debian
cache-to: type=inline
context: .
file: ./official/debian/Dockerfile
labels: ${{ steps.debian-meta.outputs.labels }}
platforms: linux/amd64,linux/386
pull: true
push: ${{ !env.ACT && github.ref == 'refs/heads/main' }}
tags: ${{ steps.debian-meta.outputs.tags }}
- name: Prepare Docker meta for an Alpine image
uses: docker/metadata-action@v5
id: alpine-meta
with:
images: |
${{ env.DOCKERHUB_REPOSITORY }}
ghcr.io/${{ env.DOCKERHUB_REPOSITORY }}
flavor: |
latest=${{ matrix.image.latest || 'false' }}
prefix=official-,onlatest=true
labels: [email protected]
tags: |
type=raw,value=${{ matrix.image.version }}-imagemagick-${{ matrix.image.imagemagick_version }}-alpine
type=raw,value=${{ matrix.image.version }}-alpine
type=raw,value=${{ matrix.image.version }}
${{ matrix.image.latest && 'type=raw,value=alpine' || '' }}
${{ matrix.image.latest && 'type=raw,prefix=,value=official' || '' }}
- name: Build an Alpine image
uses: docker/build-push-action@v5
id: alpine
with:
build-args: |
DS_KTOOLS_VERSION=${{ matrix.image.version }}
IMAGEMAGICK_IMAGE_PREFIX=${{ matrix.image.imagemagick_legacy && 'legacy-' || '' }}
IMAGEMAGICK_VERSION=${{ matrix.image.imagemagick_version }}
cache-from: type=registry,ref=${{ env.DOCKERHUB_REPOSITORY }}:official-${{ matrix.image.version }}-imagemagick-${{ matrix.image.imagemagick_version }}-alpine
cache-to: type=inline
context: .
file: ./official/alpine/Dockerfile
labels: ${{ steps.alpine-meta.outputs.labels }}
platforms: linux/amd64,linux/386
pull: true
push: ${{ !env.ACT && github.ref == 'refs/heads/main' }}
tags: ${{ steps.alpine-meta.outputs.tags }}
- name: Update Slack notification
uses: codedsolar/slack-action@v1
if: ${{ github.event_name != 'pull_request' && always() }}
with:
fields: |
{STATUS}
{REF}
ImageMagick version: ${{ matrix.image.imagemagick_version }}
ktools version: ${{ matrix.image.version }}
status: ${{ job.status }}
timestamp: ${{ steps.slack.outputs.slack-timestamp }}
latest:
needs: prepare
runs-on: ubuntu-latest
strategy:
max-parallel: 1
matrix:
image: ${{ fromJSON(needs.prepare.outputs.latest) }}
steps:
- name: Check out
uses: actions/checkout@v4
- name: Send Slack notification
uses: codedsolar/slack-action@v1
if: ${{ github.event_name != 'pull_request' }}
id: slack
with:
fields: |
{STATUS}
{REF}
ImageMagick version: ${{ matrix.image.imagemagick_version }}
ktools version: ${{ matrix.image.version }}
status: in-progress
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
if: ${{ github.event_name != 'pull_request' }}
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GHCR
uses: docker/login-action@v3
if: ${{ github.event_name != 'pull_request' }}
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GHCR_TOKEN }}
- name: Prepare Docker meta for a Debian image
uses: docker/metadata-action@v5
id: debian-meta
with:
images: |
${{ env.DOCKERHUB_REPOSITORY }}
ghcr.io/${{ env.DOCKERHUB_REPOSITORY }}
labels: [email protected]
tags: |
type=raw,value=${{ matrix.image.version }}-imagemagick-${{ matrix.image.imagemagick_version }}-debian
type=raw,value=${{ matrix.image.version }}-debian
type=raw,value=${{ matrix.image.version }}
${{ matrix.image.latest && 'type=raw,value=debian' || '' }}
- name: Build a Debian image
uses: docker/build-push-action@v5
id: debian
with:
build-args: |
DS_KTOOLS_VERSION=${{ matrix.image.version }}
IMAGEMAGICK_IMAGE_PREFIX=${{ matrix.image.imagemagick_legacy && 'legacy-' || '' }}
IMAGEMAGICK_VERSION=${{ matrix.image.imagemagick_version }}
cache-from: type=registry,ref=${{ env.DOCKERHUB_REPOSITORY }}:${{ matrix.image.version }}-imagemagick-${{ matrix.image.imagemagick_version }}-debian
cache-to: type=inline
context: .
file: ./latest/debian/Dockerfile
labels: ${{ steps.debian-meta.outputs.labels }}
platforms: linux/amd64,linux/386
pull: true
push: ${{ !env.ACT && github.ref == 'refs/heads/main' }}
tags: ${{ steps.debian-meta.outputs.tags }}
- name: Prepare Docker meta for an Alpine image
uses: docker/metadata-action@v5
id: alpine-meta
with:
images: |
${{ env.DOCKERHUB_REPOSITORY }}
ghcr.io/${{ env.DOCKERHUB_REPOSITORY }}
flavor: latest=${{ matrix.image.latest || 'false' }}
labels: [email protected]
tags: |
type=raw,value=${{ matrix.image.version }}-imagemagick-${{ matrix.image.imagemagick_version }}-alpine
type=raw,value=${{ matrix.image.version }}-alpine
type=raw,value=${{ matrix.image.version }}
${{ matrix.image.latest && 'type=raw,value=alpine' || '' }}
- name: Build an Alpine image
uses: docker/build-push-action@v5
id: alpine
with:
build-args: |
DS_KTOOLS_VERSION=${{ matrix.image.version }}
IMAGEMAGICK_IMAGE_PREFIX=${{ matrix.image.imagemagick_legacy && 'legacy-' || '' }}
IMAGEMAGICK_VERSION=${{ matrix.image.imagemagick_version }}
cache-from: type=registry,ref=${{ env.DOCKERHUB_REPOSITORY }}:${{ matrix.image.version }}-imagemagick-${{ matrix.image.imagemagick_version }}-alpine
cache-to: type=inline
context: .
file: ./latest/alpine/Dockerfile
labels: ${{ steps.alpine-meta.outputs.labels }}
platforms: linux/amd64,linux/386
pull: true
push: ${{ !env.ACT && github.ref == 'refs/heads/main' }}
tags: ${{ steps.alpine-meta.outputs.tags }}
- name: Update Slack notification
uses: codedsolar/slack-action@v1
if: ${{ github.event_name != 'pull_request' && always() }}
with:
fields: |
{STATUS}
{REF}
ImageMagick version: ${{ matrix.image.imagemagick_version }}
ktools version: ${{ matrix.image.version }}
status: ${{ job.status }}
timestamp: ${{ steps.slack.outputs.slack-timestamp }}