2023-03-18 08:48:07 -04:00
|
|
|
---
|
2022-12-09 16:58:40 -05:00
|
|
|
name: 'Docker Image'
|
2022-12-09 15:58:55 -05:00
|
|
|
|
2021-10-31 14:23:49 +01:00
|
|
|
on:
|
2022-12-09 12:30:18 -05:00
|
|
|
workflow_dispatch:
|
2021-10-31 14:23:49 +01:00
|
|
|
push:
|
|
|
|
branches:
|
2023-03-10 18:08:24 -05:00
|
|
|
- 'dev'
|
2021-10-31 14:23:49 +01:00
|
|
|
- 'master'
|
|
|
|
tags:
|
|
|
|
- 'v*.*.*'
|
2023-03-19 17:05:30 -04:00
|
|
|
paths-ignore:
|
|
|
|
- .github/**
|
|
|
|
- deploy/**
|
|
|
|
- docker-test/**
|
|
|
|
- docs/**
|
|
|
|
- .dockerignore
|
|
|
|
- .gitattributes
|
|
|
|
- .gitignore
|
|
|
|
- .lgtm.yml
|
|
|
|
- .whitesource
|
|
|
|
- .yarnrc
|
|
|
|
- docker-compose.yml
|
|
|
|
- docker-compose-test.yml
|
|
|
|
- LICENSE
|
|
|
|
- README.md
|
|
|
|
- SECURITY.md
|
2021-10-31 14:23:49 +01:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build-and-push-docker-image:
|
2022-12-09 17:02:36 -05:00
|
|
|
name: Build Docker Image
|
2021-10-31 14:23:49 +01:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
2022-12-09 11:41:38 -05:00
|
|
|
- name: Repository Checkout
|
2021-10-31 14:23:49 +01:00
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
2022-12-09 11:41:38 -05:00
|
|
|
- name: Docker Image Metadata
|
2021-10-31 14:23:49 +01:00
|
|
|
id: meta
|
|
|
|
uses: docker/metadata-action@v3
|
|
|
|
with:
|
|
|
|
images: |
|
2022-12-09 11:41:38 -05:00
|
|
|
powerdnsadmin/pda-legacy
|
2021-10-31 14:23:49 +01:00
|
|
|
tags: |
|
2021-11-06 15:37:13 +01:00
|
|
|
type=ref,event=tag
|
2021-10-31 14:23:49 +01:00
|
|
|
type=semver,pattern={{version}}
|
|
|
|
type=semver,pattern={{major}}.{{minor}}
|
|
|
|
type=semver,pattern={{major}}
|
|
|
|
|
2023-04-12 06:26:03 -04:00
|
|
|
- name: QEMU Setup
|
|
|
|
uses: docker/setup-qemu-action@v2
|
|
|
|
|
2022-12-09 11:41:38 -05:00
|
|
|
- name: Docker Buildx Setup
|
2021-10-31 14:23:49 +01:00
|
|
|
id: buildx
|
|
|
|
uses: docker/setup-buildx-action@v1
|
|
|
|
|
2022-12-09 11:41:38 -05:00
|
|
|
- name: Docker Hub Authentication
|
2021-10-31 14:23:49 +01:00
|
|
|
uses: docker/login-action@v1
|
|
|
|
with:
|
2022-12-09 11:41:38 -05:00
|
|
|
username: ${{ secrets.DOCKERHUB_USERNAME_V2 }}
|
|
|
|
password: ${{ secrets.DOCKERHUB_TOKEN_V2 }}
|
2021-10-31 14:23:49 +01:00
|
|
|
|
2022-12-09 11:41:38 -05:00
|
|
|
- name: Docker Image Build
|
2023-04-12 06:26:03 -04:00
|
|
|
uses: docker/build-push-action@v4
|
2021-10-31 14:23:49 +01:00
|
|
|
with:
|
2023-04-12 07:35:34 -04:00
|
|
|
platforms: linux/amd64,linux/arm64
|
2021-10-31 14:34:35 +01:00
|
|
|
context: ./
|
|
|
|
file: ./docker/Dockerfile
|
2021-10-31 14:23:49 +01:00
|
|
|
push: true
|
2023-03-10 18:26:39 -05:00
|
|
|
tags: powerdnsadmin/pda-legacy:${{ github.ref_name }}
|
2021-10-31 14:23:49 +01:00
|
|
|
|
2022-12-09 11:41:38 -05:00
|
|
|
- name: Docker Image Release Tagging
|
2023-04-13 13:53:39 -04:00
|
|
|
uses: docker/build-push-action@v4
|
2021-11-06 15:44:20 +01:00
|
|
|
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
|
2021-10-31 14:23:49 +01:00
|
|
|
with:
|
2023-04-13 13:53:39 -04:00
|
|
|
platforms: linux/amd64,linux/arm64
|
2021-10-31 14:34:35 +01:00
|
|
|
context: ./
|
|
|
|
file: ./docker/Dockerfile
|
2021-11-06 15:44:20 +01:00
|
|
|
push: true
|
2021-10-31 14:23:49 +01:00
|
|
|
tags: ${{ steps.meta.outputs.tags }}
|
2021-11-06 15:37:13 +01:00
|
|
|
labels: ${{ steps.meta.outputs.labels }}
|