mirror of
https://github.com/mykitserver/docker-limesurvey.git
synced 2025-12-06 16:39:11 +01:00
111 lines
3.3 KiB
YAML
111 lines
3.3 KiB
YAML
name: Publish LTS Container Images
|
|
on:
|
|
push:
|
|
tags:
|
|
- '5.*'
|
|
|
|
jobs:
|
|
lint_dockerfiles:
|
|
name: 'Lint Dockerfile with hadolint'
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
dockerfile:
|
|
- 5.0/apache/Dockerfile
|
|
- 5.0/fpm-alpine/Dockerfile
|
|
- 5.0/fpm/Dockerfile
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: hadolint/hadolint-action@v3.1.0
|
|
with:
|
|
dockerfile: ${{ matrix.dockerfile }}
|
|
ignore: "DL4006,DL3008,DL3018"
|
|
|
|
push_images_to_registries:
|
|
name: 'Push container images to registries'
|
|
runs-on: ubuntu-latest
|
|
needs: [lint_dockerfiles]
|
|
environment: docker-build
|
|
permissions:
|
|
packages: write
|
|
contents: read
|
|
steps:
|
|
- name: 'Check out the repo'
|
|
uses: actions/checkout@v3
|
|
- name: 'Set up QEMU'
|
|
uses: docker/setup-qemu-action@v2
|
|
with:
|
|
platforms: 'arm64,arm'
|
|
- name: 'Set up Docker Buildx'
|
|
uses: docker/setup-buildx-action@v2
|
|
with:
|
|
buildkitd-flags: --debug
|
|
- name: 'Log in to DockerHub'
|
|
if: github.event_name != 'pull_request'
|
|
uses: docker/login-action@v2
|
|
with:
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
password: ${{ secrets.DOCKER_HUB_TOKEN }}
|
|
- name: 'Apache variant metadata'
|
|
id: metadata-apache
|
|
uses: docker/metadata-action@v4
|
|
with:
|
|
images: |
|
|
docker.io/martialblog/limesurvey
|
|
tags: |
|
|
type=match,pattern=(.+),group=1
|
|
type=match,pattern=^(\d+),group=1
|
|
flavor: |
|
|
latest=false
|
|
suffix=-apache
|
|
- name: 'Build and push LTS apache container images'
|
|
uses: docker/build-push-action@v4
|
|
with:
|
|
context: 5.0/apache
|
|
push: true
|
|
tags: ${{ steps.metadata-apache.outputs.tags }}
|
|
labels: ${{ steps.metadata-apache.outputs.labels }}
|
|
platforms: linux/amd64,linux/arm64
|
|
|
|
- name: 'FPM variant metadata'
|
|
id: metadata-fpm
|
|
uses: docker/metadata-action@v4
|
|
with:
|
|
images: |
|
|
docker.io/martialblog/limesurvey
|
|
tags: |
|
|
type=match,pattern=(.+),group=1
|
|
type=match,pattern=^(\d+),group=1
|
|
flavor: |
|
|
latest=false
|
|
suffix=-fpm
|
|
- name: 'Build and push LTS fpm container images'
|
|
uses: docker/build-push-action@v4
|
|
with:
|
|
context: 5.0/fpm
|
|
push: true
|
|
tags: ${{ steps.metadata-fpm.outputs.tags }}
|
|
labels: ${{ steps.metadata-apache.outputs.labels }}
|
|
platforms: linux/amd64,linux/arm64
|
|
|
|
- name: 'FPM Alpine variant metadata'
|
|
id: metadata-fpm-alpine
|
|
uses: docker/metadata-action@v4
|
|
with:
|
|
images: |
|
|
docker.io/martialblog/limesurvey
|
|
tags: |
|
|
type=match,pattern=(.+),group=1
|
|
type=match,pattern=^(\d+),group=1
|
|
flavor: |
|
|
latest=false
|
|
suffix=-fpm-alpine
|
|
- name: 'Build and push LTS fpm-alpine container images'
|
|
uses: docker/build-push-action@v4
|
|
with:
|
|
context: 5.0/fpm-alpine
|
|
push: true
|
|
tags: ${{ steps.metadata-fpm-alpine.outputs.tags }}
|
|
labels: ${{ steps.metadata-apache.outputs.labels }}
|
|
platforms: linux/amd64,linux/arm64
|