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