Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
107 changes: 62 additions & 45 deletions .github/workflows/build_containers.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,30 @@
name: build and publish containers

on:
workflow_dispatch:
pull_request:
push:
tags:
- v*

permissions:
packages: write
contents: read

jobs:
build-local-ca:
runs-on: ubuntu-latest
steps:
- name: check out the repo
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Docker meta
id: meta
uses: docker/metadata-action@v5
uses: docker/metadata-action@v6
with:
# list of Docker images to use as base name for tags
images: |
ghcr.io/openchami/local-ca
ghcr.io/openchami/local-ca
# generate Docker tags based on the following events/attributes
tags: |
type=schedule
Expand All @@ -28,60 +33,72 @@ jobs:
type=semver,pattern=v{{version}}
type=semver,pattern=v{{major}}.{{minor}}
type=semver,pattern=v{{major}}
type=sha
- name: setup Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
type=sha

- name: Login to github container repo
uses: docker/login-action@v3
uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4

- name: Build and push
uses: docker/build-push-action@v5
uses: docker/build-push-action@v7
with:
platforms: linux/amd64,linux/arm64
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

build-acmesh:
runs-on: ubuntu-latest
steps:
- name: check out the repo
uses: actions/checkout@v4
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
# list of Docker images to use as base name for tags
images: |
ghcr.io/openchami/acme.sh
# generate Docker tags based on the following events/attributes
tags: |
type=schedule
type=ref,event=branch
type=ref,event=pr
type=semver,pattern=v{{version}}
type=semver,pattern=v{{major}}.{{minor}}
type=semver,pattern=v{{major}}
type=sha
- name: setup Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to github container repo
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
platforms: linux/amd64,linux/arm64
context: .
file: Dockerfile.acme
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: check out the repo
uses: actions/checkout@v6

- name: Docker meta
id: meta
uses: docker/metadata-action@v6
with:
# list of Docker images to use as base name for tags
images: |
ghcr.io/openchami/acme.sh
# generate Docker tags based on the following events/attributes
tags: |
type=schedule
type=ref,event=branch
type=ref,event=pr
type=semver,pattern=v{{version}}
type=semver,pattern=v{{major}}.{{minor}}
type=semver,pattern=v{{major}}
type=sha

- name: Login to github container repo
uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4

- name: Build and push
uses: docker/build-push-action@v7
with:
platforms: linux/amd64,linux/arm64
context: .
file: Dockerfile.acme
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ HEALTHCHECK CMD step ca health 2>/dev/null | grep "^ok" >/dev/null

COPY entrypoint.sh /entrypoint.sh

EXPOSE 9000/TCP
EXPOSE 9000/tcp

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