-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (43 loc) · 1.31 KB
/
build-docker-image.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: dnsdist-acme Docker Image CI
on:
push:
branches: ["master"]
pull_request:
branches: ["master"]
jobs:
build:
runs-on: ubuntu-latest
# Permissions to use OIDC token authentication
permissions:
contents: read
id-token: write
# Allows pushing to the GitHub Container Registry
packages: write
steps:
- uses: actions/checkout@v3
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ragibkl/dnsdist-acme
tags: |
# default setups
type=schedule
type=ref,event=branch
type=ref,event=tag
type=ref,event=pr
# set latest tag for master branch
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'master') }}
- uses: depot/setup-action@v1
- uses: depot/build-push-action@v1
with:
context: .
platforms: linux/amd64,linux/arm64,linux/386,linux/arm/v7
project: 83rwjkn7g4
push: true
tags: ${{ steps.meta.outputs.tags }}