Skip to content

Merge pull request #70 from crazy-max/dependabot/github_actions/docke… #162

Merge pull request #70 from crazy-max/dependabot/github_actions/docke…

Merge pull request #70 from crazy-max/dependabot/github_actions/docke… #162

Workflow file for this run

name: build-1.0.47
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
push:
branches:
- 'master'
tags:
- '1.0.47-*'
paths-ignore:
- '**.md'
pull_request:
paths-ignore:
- '**.md'
env:
DOCKERHUB_SLUG: crazymax/pure-ftpd
GHCR_SLUG: ghcr.io/crazy-max/pure-ftpd
jobs:
build:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
${{ env.DOCKERHUB_SLUG }}
${{ env.GHCR_SLUG }}
tags: |
type=match,pattern=(.*)-r,group=1
type=ref,event=pr
flavor: |
latest=false
labels: |
org.opencontainers.image.title=Pure-FTPd
org.opencontainers.image.description=Pure-FTPd with MySQL, PostgreSQL and LDAP support
org.opencontainers.image.vendor=CrazyMax
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Login to DockerHub
if: startsWith(github.ref, 'refs/tags/')
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
-
name: Login to GHCR
if: startsWith(github.ref, 'refs/tags/')
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Build
uses: docker/bake-action@v4
with:
files: |
./docker-bake.hcl
${{ steps.meta.outputs.bake-file }}
targets: image-all
push: ${{ startsWith(github.ref, 'refs/tags/') }}
env:
DOCKERFILE: Dockerfile-1.0.47
-
name: Check manifest
if: startsWith(github.ref, 'refs/tags/')
run: |
docker buildx imagetools inspect ${{ env.DOCKERHUB_SLUG }}:${{ steps.meta.outputs.version }}
docker buildx imagetools inspect ${{ env.GHCR_SLUG }}:${{ steps.meta.outputs.version }}
-
name: Inspect image
if: startsWith(github.ref, 'refs/tags/')
run: |
docker pull ${{ env.DOCKERHUB_SLUG }}:${{ steps.meta.outputs.version }}
docker image inspect ${{ env.DOCKERHUB_SLUG }}:${{ steps.meta.outputs.version }}
docker pull ${{ env.GHCR_SLUG }}:${{ steps.meta.outputs.version }}
docker image inspect ${{ env.GHCR_SLUG }}:${{ steps.meta.outputs.version }}