+32
-12
lines changedFilter options
+32
-12
lines changed Original file line number Diff line number Diff line change
@@ -1,26 +1,37 @@
1
-
name: Build and publish cfssl docker image
1
+
name: cfssl docker
2
2
3
3
on:
4
+
workflow_dispatch:
4
5
push:
6
+
branches:
7
+
- "master"
5
8
tags:
6
-
- 'v*.*.*'
7
-
9
+
- "v*"
8
10
jobs:
9
11
build-and-push-image:
10
12
runs-on: ubuntu-latest
11
13
permissions:
12
14
contents: read
13
15
packages: write
16
+
strategy:
17
+
matrix:
18
+
include:
19
+
# github container registry
20
+
- registry: "ghcr.io"
21
+
username: ${{ github.actor }}
22
+
password_secret: GITHUB_TOKEN
23
+
image: ghcr.io/cloudflare/cfssl
24
+
# docker test publish, todo: switch to service account
25
+
- registry: ""
26
+
username: nicky
27
+
password_secret: DOCKER_REGISTRY_TOKEN_NICKY
28
+
image: cfssl/cfssl
14
29
steps:
15
30
- name: Checkout repository
16
31
uses: actions/checkout@v3
17
32
with:
18
33
fetch-depth: 0
19
34
20
-
- name: Get tag
21
-
id: cfssl
22
-
run: echo "::set-output name=tag::$(git describe --tags HEAD)"
23
-
24
35
- name: Set up QEMU
25
36
uses: docker/setup-qemu-action@v2
26
37
@@ -30,13 +41,19 @@ jobs:
30
41
- name: Log in to the Docker hub
31
42
uses: docker/login-action@v2
32
43
with:
33
-
username: ${{ secrets.DOCKERHUB_USERNAME }}
34
-
password: ${{ secrets.DOCKERHUB_TOKEN }}
35
-
44
+
registry: ${{ matrix.registry }}
45
+
username: ${{ matrix.username }}
46
+
password: ${{ secrets[matrix.password_secret] }}
47
+
- name: Extract metadata (tags, labels) for Docker
48
+
id: meta
49
+
uses: docker/metadata-action@v4
50
+
with:
51
+
images: ${{ matrix.image }}
36
52
- name: Build and push
37
53
uses: docker/build-push-action@v3
38
54
with:
39
55
context: .
40
56
platforms: linux/amd64,linux/arm64,linux/s390x
41
57
push: true
42
-
tags: cfssl:${{ steps.cfssl.outputs.tag }}
58
+
tags: ${{ steps.meta.outputs.tags }}
59
+
labels: ${{ steps.meta.outputs.labels }}
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
1
-
FROM --platform=${BUILDPLATFORM} golang:1.19.3
1
+
FROM --platform=${BUILDPLATFORM} golang:1.20
2
+
3
+
LABEL org.opencontainers.image.source https://github.com/cloudflare/cfssl
4
+
LABEL org.opencontainers.image.description "Cloudflare's PKI toolkit"
2
5
3
6
ARG TARGETOS
4
7
ARG TARGETARCH
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4