From 81809a1476cafd64430565e425fe952009bff69f Mon Sep 17 00:00:00 2001 From: Sorah Fukumori Date: Sat, 14 Mar 2026 09:24:41 +0900 Subject: [PATCH 1/4] releng v2.9.0 --- CHANGELOG.md | 11 ++++++++++- Gemfile.lock | 2 +- lib/acmesmith/version.rb | 2 +- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2862aaa..f1e3012 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,17 @@ ## [unreleased] +## v2.9.0 (2026-03-14) + ### Enhancements -- `acmesmith order` and configuration file gain `profiles` configuration to allow switching ACME profiles such as `shortlived` +- `acmesmith order` and configuration file gain `profiles` configuration to allow switching ACME profiles such as `shortlived` [#81](https://github.com/sorah/acmesmith/pull/81) + + ```yaml + profiles: + - name: "shortlived" + filter: + subject_name_suffix: [".shortlived.example.invalid"] + ``` ## v2.8.0 (2025-11-11) diff --git a/Gemfile.lock b/Gemfile.lock index 7fa106d..d6de3c7 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - acmesmith (2.8.0) + acmesmith (2.9.0) acme-client (>= 2.0.7, < 3) aws-sdk-acm aws-sdk-route53 diff --git a/lib/acmesmith/version.rb b/lib/acmesmith/version.rb index fe5707b..71264e5 100644 --- a/lib/acmesmith/version.rb +++ b/lib/acmesmith/version.rb @@ -1,3 +1,3 @@ module Acmesmith - VERSION = "2.8.0" + VERSION = "2.9.0" end From 380380265c1ca7139d1826eead3d6da43df6b8a6 Mon Sep 17 00:00:00 2001 From: Sorah Fukumori Date: Sat, 14 Mar 2026 09:31:08 +0900 Subject: [PATCH 2/4] reusable workflow for ci, pr and release --- .github/workflows/_test.yml | 58 +++++++++++++++++ .github/workflows/build.yml | 113 ---------------------------------- .github/workflows/ci.yml | 58 +++++++++++++++++ .github/workflows/pr.yml | 9 +++ .github/workflows/release.yml | 4 ++ 5 files changed, 129 insertions(+), 113 deletions(-) create mode 100644 .github/workflows/_test.yml delete mode 100644 .github/workflows/build.yml create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/pr.yml diff --git a/.github/workflows/_test.yml b/.github/workflows/_test.yml new file mode 100644 index 0000000..e9d102f --- /dev/null +++ b/.github/workflows/_test.yml @@ -0,0 +1,58 @@ +name: test + +on: + workflow_call: + +jobs: + test: + name: rspec + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + ruby-version: ['3.3', '3.4', '4.0'] + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - uses: sorah-rbpkg/actions@bcd0417f7e6e66bf85a51bf49f323ad4db3bfb12 # v3.0.1 + with: + ruby-version: "${{ matrix.ruby-version }}" + bundler-cache: true + - run: 'bundle exec rspec -fd' + + integration-pebble: + name: integration-pebble + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + ruby-version: ['3.3', '3.4', '4.0'] + + # FIXME: once GitHub Actions gains support of adding command line arguments to container + # services: + # # https://github.com/letsencrypt/pebble + # pebble: + # image: letsencrypt/pebble + # ports: + # - 14000:14000 # ACME port + # - 15000:15000 # Management port + # options: "pebble -config /test/config/pebble-config.json -strict -dnsserver 127.0.0.1:8053" + # + # challtestsrv: + # image: letsencrypt/pebble-challtestsrv:latest + # ports: + # - 8055:8055 # HTTP Management API + # - 8053:8053/udp # DNS + # - 8053:8053 # DNS + # options: 'pebble-challtestsrv -management :8055 -defaultIPv4 127.0.0.1' + + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + + - uses: sorah-rbpkg/actions@bcd0417f7e6e66bf85a51bf49f323ad4db3bfb12 # v3.0.1 + with: + ruby-version: "${{ matrix.ruby-version }}" + bundler-cache: true + + - run: 'docker run -d --net=host --rm ghcr.io/letsencrypt/pebble:2.10 -config /test/config/pebble-config.json -strict -dnsserver 127.0.0.1:8053' + - run: 'docker run -d --net=host --rm ghcr.io/letsencrypt/pebble-challtestsrv:2.10 -management :8055 -defaultIPv4 127.0.0.1' + - run: 'bundle exec rspec -fd -t integration_pebble' diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index 87c6533..0000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,113 +0,0 @@ -name: ci -on: - schedule: - - cron: '36 7 2,12,22 * *' - create: {} - pull_request: - branches: [master] - push: - branches: [master, ci-test] - -env: - DOCKER_REPO: 'sorah/acmesmith' - -jobs: - test: - name: rspec - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - ruby-version: ['3.3', '3.4', '4.0'] - steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - uses: sorah-rbpkg/actions@bcd0417f7e6e66bf85a51bf49f323ad4db3bfb12 # v3.0.1 - with: - ruby-version: "${{ matrix.ruby-version }}" - bundler-cache: true - - run: 'bundle exec rspec -fd' - - integration-pebble: - name: integration-pebble - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - ruby-version: ['3.3', '3.4', '4.0'] - - # FIXME: once GitHub Actions gains support of adding command line arguments to container - # services: - # # https://github.com/letsencrypt/pebble - # pebble: - # image: letsencrypt/pebble - # ports: - # - 14000:14000 # ACME port - # - 15000:15000 # Management port - # options: "pebble -config /test/config/pebble-config.json -strict -dnsserver 127.0.0.1:8053" - # - # challtestsrv: - # image: letsencrypt/pebble-challtestsrv:latest - # ports: - # - 8055:8055 # HTTP Management API - # - 8053:8053/udp # DNS - # - 8053:8053 # DNS - # options: 'pebble-challtestsrv -management :8055 -defaultIPv4 127.0.0.1' - - steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - - uses: sorah-rbpkg/actions@bcd0417f7e6e66bf85a51bf49f323ad4db3bfb12 # v3.0.1 - with: - ruby-version: "${{ matrix.ruby-version }}" - bundler-cache: true - - - run: 'docker run -d --net=host --rm ghcr.io/letsencrypt/pebble:2.10 -config /test/config/pebble-config.json -strict -dnsserver 127.0.0.1:8053' - - run: 'docker run -d --net=host --rm ghcr.io/letsencrypt/pebble-challtestsrv:2.10 -management :8055 -defaultIPv4 127.0.0.1' - - run: 'bundle exec rspec -fd -t integration_pebble' - - docker-build: - name: docker-build - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - run: 'echo $GITHUB_SHA > REVISION' - - - run: "docker pull ${DOCKER_REPO}:latest || :" - - name: "docker tag ${DOCKER_REPO}:${TAG} ${DOCKER_REPO}:latest" - run: | - TAG=$(basename "${{ github.ref }}") - docker pull ${DOCKER_REPO}:${TAG} || : - docker tag ${DOCKER_REPO}:${TAG} ${DOCKER_REPO}:latest || : - if: "${{ startsWith(github.ref, 'refs/tags/v') }}" - - - run: "docker pull ${DOCKER_REPO}:builder || :" - - - run: "docker build --pull --cache-from ${DOCKER_REPO}:builder --target builder -t ${DOCKER_REPO}:builder -f Dockerfile ." - - run: "docker build --pull --cache-from ${DOCKER_REPO}:builder --cache-from ${DOCKER_REPO}:latest -t ${DOCKER_REPO}:${GITHUB_SHA} -f Dockerfile ." - - - run: "echo ${{ secrets.DOCKERHUB_TOKEN }} | docker login -u sorah --password-stdin" - if: "${{ github.event_name != 'pull_request' }}" - - - run: "docker push ${DOCKER_REPO}:builder" - if: "${{ github.ref == 'refs/heads/master' }}" - - run: "docker push ${DOCKER_REPO}:${GITHUB_SHA}" - if: "${{ github.event_name != 'pull_request' }}" - - docker-push: - name: docker-push - needs: [test, integration-pebble, docker-build] - if: "${{ github.event_name == 'push' || github.event_name == 'create' }}" - runs-on: ubuntu-latest - steps: - - run: "echo ${{ secrets.DOCKERHUB_TOKEN }} | docker login -u sorah --password-stdin" - - run: "docker pull ${DOCKER_REPO}:${GITHUB_SHA}" - - - run: | - docker tag ${DOCKER_REPO}:${GITHUB_SHA} ${DOCKER_REPO}:latest - docker push ${DOCKER_REPO}:latest - if: "${{ github.ref == 'refs/heads/master' }}" - - run: | - TAG=$(basename "${{ github.ref }}") - docker tag ${DOCKER_REPO}:${GITHUB_SHA} ${DOCKER_REPO}:${TAG} - docker push ${DOCKER_REPO}:${TAG} - if: "${{ startsWith(github.ref, 'refs/tags/v') }}" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..968b95e --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,58 @@ +name: ci +on: + schedule: + - cron: '36 7 2,12,22 * *' + create: {} + push: + branches: [master, ci-test] + +env: + DOCKER_REPO: 'sorah/acmesmith' + +jobs: + test: + uses: ./.github/workflows/_test.yml + + docker-build: + name: docker-build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - run: 'echo $GITHUB_SHA > REVISION' + + - run: "docker pull ${DOCKER_REPO}:latest || :" + - name: "docker tag ${DOCKER_REPO}:${TAG} ${DOCKER_REPO}:latest" + run: | + TAG=$(basename "${{ github.ref }}") + docker pull ${DOCKER_REPO}:${TAG} || : + docker tag ${DOCKER_REPO}:${TAG} ${DOCKER_REPO}:latest || : + if: "${{ startsWith(github.ref, 'refs/tags/v') }}" + + - run: "docker pull ${DOCKER_REPO}:builder || :" + + - run: "docker build --pull --cache-from ${DOCKER_REPO}:builder --target builder -t ${DOCKER_REPO}:builder -f Dockerfile ." + - run: "docker build --pull --cache-from ${DOCKER_REPO}:builder --cache-from ${DOCKER_REPO}:latest -t ${DOCKER_REPO}:${GITHUB_SHA} -f Dockerfile ." + + - run: "echo ${{ secrets.DOCKERHUB_TOKEN }} | docker login -u sorah --password-stdin" + + - run: "docker push ${DOCKER_REPO}:builder" + if: "${{ github.ref == 'refs/heads/master' }}" + - run: "docker push ${DOCKER_REPO}:${GITHUB_SHA}" + + docker-push: + name: docker-push + needs: [test, docker-build] + runs-on: ubuntu-latest + steps: + - run: "echo ${{ secrets.DOCKERHUB_TOKEN }} | docker login -u sorah --password-stdin" + - run: "docker pull ${DOCKER_REPO}:${GITHUB_SHA}" + + - run: | + docker tag ${DOCKER_REPO}:${GITHUB_SHA} ${DOCKER_REPO}:latest + docker push ${DOCKER_REPO}:latest + if: "${{ github.ref == 'refs/heads/master' }}" + - run: | + TAG=$(basename "${{ github.ref }}") + docker tag ${DOCKER_REPO}:${GITHUB_SHA} ${DOCKER_REPO}:${TAG} + docker push ${DOCKER_REPO}:${TAG} + if: "${{ startsWith(github.ref, 'refs/tags/v') }}" diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml new file mode 100644 index 0000000..96a218d --- /dev/null +++ b/.github/workflows/pr.yml @@ -0,0 +1,9 @@ +name: pr + +on: + pull_request: + branches: [master] + +jobs: + test: + uses: ./.github/workflows/_test.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9dd50bf..82e79a2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,7 +4,11 @@ on: - 'v*' jobs: + test: + uses: ./.github/workflows/_test.yml + release: + needs: [test] runs-on: ubuntu-slim environment: name: release From f81f500c486c59a7dbb1764f6a9e31b3e2aeab23 Mon Sep 17 00:00:00 2001 From: Sorah Fukumori Date: Sat, 14 Mar 2026 09:34:45 +0900 Subject: [PATCH 3/4] docker push to ghcr --- .github/workflows/ci.yml | 81 +++++++++++++++++++++------------------- CHANGELOG.md | 4 ++ README.md | 2 +- 3 files changed, 47 insertions(+), 40 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 968b95e..6b38c39 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,52 +7,55 @@ on: branches: [master, ci-test] env: - DOCKER_REPO: 'sorah/acmesmith' + DOCKER_REPO: 'ghcr.io/sorah/acmesmith' jobs: test: uses: ./.github/workflows/_test.yml - docker-build: - name: docker-build + docker: + name: docker + needs: [test] runs-on: ubuntu-latest + permissions: + contents: read + packages: write + attestations: write + id-token: write steps: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - run: 'echo $GITHUB_SHA > REVISION' - - run: "docker pull ${DOCKER_REPO}:latest || :" - - name: "docker tag ${DOCKER_REPO}:${TAG} ${DOCKER_REPO}:latest" - run: | - TAG=$(basename "${{ github.ref }}") - docker pull ${DOCKER_REPO}:${TAG} || : - docker tag ${DOCKER_REPO}:${TAG} ${DOCKER_REPO}:latest || : - if: "${{ startsWith(github.ref, 'refs/tags/v') }}" - - - run: "docker pull ${DOCKER_REPO}:builder || :" - - - run: "docker build --pull --cache-from ${DOCKER_REPO}:builder --target builder -t ${DOCKER_REPO}:builder -f Dockerfile ." - - run: "docker build --pull --cache-from ${DOCKER_REPO}:builder --cache-from ${DOCKER_REPO}:latest -t ${DOCKER_REPO}:${GITHUB_SHA} -f Dockerfile ." - - - run: "echo ${{ secrets.DOCKERHUB_TOKEN }} | docker login -u sorah --password-stdin" - - - run: "docker push ${DOCKER_REPO}:builder" - if: "${{ github.ref == 'refs/heads/master' }}" - - run: "docker push ${DOCKER_REPO}:${GITHUB_SHA}" - - docker-push: - name: docker-push - needs: [test, docker-build] - runs-on: ubuntu-latest - steps: - - run: "echo ${{ secrets.DOCKERHUB_TOKEN }} | docker login -u sorah --password-stdin" - - run: "docker pull ${DOCKER_REPO}:${GITHUB_SHA}" - - - run: | - docker tag ${DOCKER_REPO}:${GITHUB_SHA} ${DOCKER_REPO}:latest - docker push ${DOCKER_REPO}:latest - if: "${{ github.ref == 'refs/heads/master' }}" - - run: | - TAG=$(basename "${{ github.ref }}") - docker tag ${DOCKER_REPO}:${GITHUB_SHA} ${DOCKER_REPO}:${TAG} - docker push ${DOCKER_REPO}:${TAG} - if: "${{ startsWith(github.ref, 'refs/tags/v') }}" + - uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0 + + - uses: docker/login-action@b45d80f862d83dbcd57f89517bcf500b2ab88fb2 # v4.0.0 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - uses: docker/metadata-action@030e881283bb7a6894de51c315a6bfe6a94e05cf # v6.0.0 + id: meta + with: + images: ${{ env.DOCKER_REPO }} + tags: | + type=sha + type=ref,event=branch + type=semver,pattern=v{{version}} + type=semver,pattern=v{{major}}.{{minor}} + + - uses: docker/build-push-action@d08e5c354a6adb9ed34480a06d141179aa583294 # v7.0.0 + id: push + with: + context: . + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + cache-from: type=gha + cache-to: type=gha,mode=max + + - uses: actions/attest-build-provenance@a2bbfa25375fe432b6a289bc6b6cd05ecd0c4c32 # v4.1.0 + with: + subject-name: ${{ env.DOCKER_REPO }} + subject-digest: ${{ steps.push.outputs.digest }} + push-to-registry: true diff --git a/CHANGELOG.md b/CHANGELOG.md index f1e3012..37ec519 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,10 @@ subject_name_suffix: [".shortlived.example.invalid"] ``` +### Changes + +- Prebuilt Docker images are no longer pushed to Dockerhub. Use GHCR instead: [ghcr.io/sorah/acmesmith](https://ghcr.io/sorah/acmesmith) + ## v2.8.0 (2025-11-11) ### Enhancements diff --git a/README.md b/README.md index 87964a8..73e4e11 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ docker run -v /path/to/acmesmith.yml:/app/acmesmith.yml:ro sorah/acmesmith:lates [`Dockerfile`](./Dockerfile) is available. Default confguration file is at `/app/acmesmith.yml`. -Pre-built docker images are provided at https://hub.docker.com/r/sorah/acmesmith for your convenience +Pre-built docker images are provided at https://ghcr.io/sorah/acmesmith for your convenience Built with GitHub Actions & [sorah-rbpkg/dockerfiles](https://github.com/sorah-rbpkg/dockerfiles). ## Usage From be10803b99f44fa3950b516c3a7be76239617adb Mon Sep 17 00:00:00 2001 From: Sorah Fukumori Date: Sat, 14 Mar 2026 09:38:09 +0900 Subject: [PATCH 4/4] ci.yml: remove `create` trigger --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6b38c39..defe4fd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,7 +2,6 @@ name: ci on: schedule: - cron: '36 7 2,12,22 * *' - create: {} push: branches: [master, ci-test]