Skip to content

Commit

Permalink
WIP reusable post-cache setup workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
yndajas committed Nov 14, 2024
1 parent 19006d0 commit 1cc728f
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 42 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/continuous-integration-load-cache.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
on:
workflow_call:

jobs:
set-up-post-cache-job:
name: Set up post-cache job
runs-on: ubuntu-latest
steps:
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Load cache image
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
build-args: |
RAILS_ENV=test
push: false
load: true
tags: app_test:latest
cache-from: type=gha
48 changes: 6 additions & 42 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,20 +41,8 @@ jobs:
name: Checkout
uses: actions/checkout@v4
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Build and cache
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
build-args: |
RAILS_ENV=test
push: false
load: true
tags: app_test:latest
cache-from: type=gha
name: Set up post-cache job
uses: ./.github/workflows/continuous-integration-load-cache.yml
-
name: Run linters and formatters
run: |
Expand All @@ -72,20 +60,8 @@ jobs:
name: Checkout
uses: actions/checkout@v4
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Build and cache
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
build-args: |
RAILS_ENV=test
push: false
load: true
tags: app_test:latest
cache-from: type=gha
name: Set up post-cache job
uses: ./.github/workflows/continuous-integration-load-cache.yml
-
name: Run Brakeman
run: |
Expand All @@ -100,20 +76,8 @@ jobs:
name: Checkout
uses: actions/checkout@v4
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Build and cache
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
build-args: |
RAILS_ENV=test
push: false
load: true
tags: app_test:latest
cache-from: type=gha
name: Set up post-cache job
uses: ./.github/workflows/continuous-integration-load-cache.yml
-
name: Run RSpec and Simplecov
run: |
Expand Down

0 comments on commit 1cc728f

Please sign in to comment.