From 31d3e6300d8ae14aa347261ec3533fe458e1c16e Mon Sep 17 00:00:00 2001 From: Gil Desmarais Date: Fri, 1 May 2026 14:23:22 +0200 Subject: [PATCH 1/3] ci: use gha cache and fix release-please triggers --- .github/workflows/ci.yml | 36 +++++++++++++++++------------------ .github/workflows/release.yml | 17 ++--------------- 2 files changed, 20 insertions(+), 33 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 76c8f23e..aba0a425 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -126,26 +126,24 @@ jobs: - ruby - openapi - frontend + if: github.event_name != 'pull_request' || !startsWith(github.head_ref, 'release-please--') runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 - + - uses: docker/setup-buildx-action@v4 - name: Build Docker smoke image - run: docker build -t html2rss/web -f Dockerfile . - - - name: Export Docker smoke image - run: docker save html2rss/web -o /tmp/html2rss-web-smoke-image.tar - - - name: Upload Docker smoke image - uses: actions/upload-artifact@v7 + uses: docker/build-push-action@v7 with: - name: docker-smoke-image - path: /tmp/html2rss-web-smoke-image.tar - retention-days: 1 + context: . + load: true + tags: html2rss/web + cache-from: type=gha + cache-to: type=gha,mode=max docker-test: needs: - docker-build-smoke-image + if: github.event_name != 'pull_request' || !startsWith(github.head_ref, 'release-please--') runs-on: ubuntu-latest strategy: fail-fast: false @@ -158,14 +156,16 @@ jobs: with: bundler-cache: true - - name: Download Docker smoke image - uses: actions/download-artifact@v8 - with: - name: docker-smoke-image - path: /tmp + - uses: docker/setup-buildx-action@v4 - - name: Load Docker smoke image - run: docker load -i /tmp/html2rss-web-smoke-image.tar + - name: Build Docker smoke image + uses: docker/build-push-action@v7 + with: + context: . + load: true + tags: html2rss/web + cache-from: type=gha + cache-to: type=gha,mode=max - name: Run Docker smoke test env: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a944c296..1678884d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -154,14 +154,6 @@ jobs: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - - name: Cache Docker layers - uses: actions/cache@v4 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx- - - name: Build and push Docker image uses: docker/build-push-action@v7 env: @@ -174,8 +166,8 @@ jobs: BUILD_TAG=${{ env.RELEASE_VERSION }} GIT_SHA=${{ needs.guard.outputs.target_sha }} platforms: linux/amd64,linux/arm64 - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache-new + cache-from: type=gha + cache-to: type=gha,mode=max provenance: true sbom: true labels: | @@ -188,11 +180,6 @@ jobs: org.opencontainers.image.url=https://github.com/${{ github.repository }}/releases/tag/${{ env.RELEASE_TAG }} org.opencontainers.image.version=${{ env.RELEASE_VERSION }} - - name: Move updated cache into place - run: | - rm -rf /tmp/.buildx-cache - mv /tmp/.buildx-cache-new /tmp/.buildx-cache - - name: Summarize published image tags run: | { From abed541884c81d4a0d6fff657956243e780697c2 Mon Sep 17 00:00:00 2001 From: Gil Desmarais Date: Fri, 1 May 2026 14:35:51 +0200 Subject: [PATCH 2/3] ci: refine docker cache usage and standardization --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index aba0a425..a55c197a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -158,14 +158,14 @@ jobs: - uses: docker/setup-buildx-action@v4 - - name: Build Docker smoke image + - name: Load Docker smoke image from cache uses: docker/build-push-action@v7 with: context: . load: true tags: html2rss/web cache-from: type=gha - cache-to: type=gha,mode=max + # No cache-to here; we only want to read the image built in the previous job - name: Run Docker smoke test env: From 139598c96379b3034fe7f95833467ed63d2fda0d Mon Sep 17 00:00:00 2001 From: Gil Desmarais Date: Fri, 1 May 2026 14:45:10 +0200 Subject: [PATCH 3/3] ci: use gha cache for smoke image distribution --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a55c197a..cb6f2193 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -165,7 +165,6 @@ jobs: load: true tags: html2rss/web cache-from: type=gha - # No cache-to here; we only want to read the image built in the previous job - name: Run Docker smoke test env: