Skip to content

Commit e53dfa5

Browse files
authored
Merge pull request #4 from OpenCHAMI/fix/arm-builds
2 parents 863b4a6 + 61688fd commit e53dfa5

File tree

2 files changed

+64
-47
lines changed

2 files changed

+64
-47
lines changed
Lines changed: 62 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,30 @@
11
name: build and publish containers
2+
23
on:
34
workflow_dispatch:
5+
pull_request:
46
push:
57
tags:
68
- v*
9+
710
permissions:
811
packages: write
912
contents: read
13+
1014
jobs:
1115
build-local-ca:
1216
runs-on: ubuntu-latest
1317
steps:
1418
- name: check out the repo
15-
uses: actions/checkout@v4
19+
uses: actions/checkout@v6
20+
1621
- name: Docker meta
1722
id: meta
18-
uses: docker/metadata-action@v5
23+
uses: docker/metadata-action@v6
1924
with:
2025
# list of Docker images to use as base name for tags
2126
images: |
22-
ghcr.io/openchami/local-ca
27+
ghcr.io/openchami/local-ca
2328
# generate Docker tags based on the following events/attributes
2429
tags: |
2530
type=schedule
@@ -28,60 +33,72 @@ jobs:
2833
type=semver,pattern=v{{version}}
2934
type=semver,pattern=v{{major}}.{{minor}}
3035
type=semver,pattern=v{{major}}
31-
type=sha
32-
- name: setup Docker Buildx
33-
uses: docker/setup-buildx-action@v3
34-
- name: Set up QEMU
35-
uses: docker/setup-qemu-action@v3
36+
type=sha
37+
3638
- name: Login to github container repo
37-
uses: docker/login-action@v3
39+
uses: docker/login-action@v4
3840
with:
3941
registry: ghcr.io
4042
username: ${{ github.actor }}
4143
password: ${{ secrets.GITHUB_TOKEN }}
44+
45+
- name: Set up QEMU
46+
uses: docker/setup-qemu-action@v4
47+
48+
- name: Set up Docker Buildx
49+
uses: docker/setup-buildx-action@v4
50+
4251
- name: Build and push
43-
uses: docker/build-push-action@v5
52+
uses: docker/build-push-action@v7
4453
with:
4554
platforms: linux/amd64,linux/arm64
4655
context: .
4756
push: ${{ github.event_name != 'pull_request' }}
4857
tags: ${{ steps.meta.outputs.tags }}
4958
labels: ${{ steps.meta.outputs.labels }}
59+
5060
build-acmesh:
5161
runs-on: ubuntu-latest
5262
steps:
53-
- name: check out the repo
54-
uses: actions/checkout@v4
55-
- name: Docker meta
56-
id: meta
57-
uses: docker/metadata-action@v5
58-
with:
59-
# list of Docker images to use as base name for tags
60-
images: |
61-
ghcr.io/openchami/acme.sh
62-
# generate Docker tags based on the following events/attributes
63-
tags: |
64-
type=schedule
65-
type=ref,event=branch
66-
type=ref,event=pr
67-
type=semver,pattern=v{{version}}
68-
type=semver,pattern=v{{major}}.{{minor}}
69-
type=semver,pattern=v{{major}}
70-
type=sha
71-
- name: setup Docker Buildx
72-
uses: docker/setup-buildx-action@v3
73-
- name: Login to github container repo
74-
uses: docker/login-action@v3
75-
with:
76-
registry: ghcr.io
77-
username: ${{ github.actor }}
78-
password: ${{ secrets.GITHUB_TOKEN }}
79-
- name: Build and push
80-
uses: docker/build-push-action@v5
81-
with:
82-
platforms: linux/amd64,linux/arm64
83-
context: .
84-
file: Dockerfile.acme
85-
push: ${{ github.event_name != 'pull_request' }}
86-
tags: ${{ steps.meta.outputs.tags }}
87-
labels: ${{ steps.meta.outputs.labels }}
63+
- name: check out the repo
64+
uses: actions/checkout@v6
65+
66+
- name: Docker meta
67+
id: meta
68+
uses: docker/metadata-action@v6
69+
with:
70+
# list of Docker images to use as base name for tags
71+
images: |
72+
ghcr.io/openchami/acme.sh
73+
# generate Docker tags based on the following events/attributes
74+
tags: |
75+
type=schedule
76+
type=ref,event=branch
77+
type=ref,event=pr
78+
type=semver,pattern=v{{version}}
79+
type=semver,pattern=v{{major}}.{{minor}}
80+
type=semver,pattern=v{{major}}
81+
type=sha
82+
83+
- name: Login to github container repo
84+
uses: docker/login-action@v4
85+
with:
86+
registry: ghcr.io
87+
username: ${{ github.actor }}
88+
password: ${{ secrets.GITHUB_TOKEN }}
89+
90+
- name: Set up QEMU
91+
uses: docker/setup-qemu-action@v4
92+
93+
- name: Set up Docker Buildx
94+
uses: docker/setup-buildx-action@v4
95+
96+
- name: Build and push
97+
uses: docker/build-push-action@v7
98+
with:
99+
platforms: linux/amd64,linux/arm64
100+
context: .
101+
file: Dockerfile.acme
102+
push: ${{ github.event_name != 'pull_request' }}
103+
tags: ${{ steps.meta.outputs.tags }}
104+
labels: ${{ steps.meta.outputs.labels }}

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ HEALTHCHECK CMD step ca health 2>/dev/null | grep "^ok" >/dev/null
1818

1919
COPY entrypoint.sh /entrypoint.sh
2020

21-
EXPOSE 9000/TCP
21+
EXPOSE 9000/tcp
2222

2323
ENTRYPOINT ["/bin/bash", "/entrypoint.sh"]
24-
CMD exec /usr/bin/step-ca --password-file $PWDPATH $CONFIGPATH
24+
CMD ["exec","/usr/bin/step-ca","--password-file","$PWDPATH","$CONFIGPATH"]

0 commit comments

Comments
 (0)