diff --git a/.github/workflows/build_containers.yml b/.github/workflows/build_containers.yml index 2499442..724a030 100644 --- a/.github/workflows/build_containers.yml +++ b/.github/workflows/build_containers.yml @@ -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 @@ -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 }} diff --git a/Dockerfile b/Dockerfile index 58968e2..9a33cce 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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"]