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
35 changes: 17 additions & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -158,14 +156,15 @@ 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: Load Docker smoke image from cache
uses: docker/build-push-action@v7
with:
context: .
load: true
tags: html2rss/web
cache-from: type=gha
Comment on lines +161 to +167

- name: Run Docker smoke test
env:
Expand Down
17 changes: 2 additions & 15 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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: |
Expand All @@ -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: |
{
Expand Down
Loading