Skip to content

Commit

Permalink
fix: do not use intermediate images docker/buildx#1453
Browse files Browse the repository at this point in the history
  • Loading branch information
jenyapoyarkov committed Jul 26, 2023
1 parent 5e5406e commit b2ce026
Showing 1 changed file with 42 additions and 39 deletions.
81 changes: 42 additions & 39 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
ghcr.io/beaglesinspace/supabase-spilo/focal-python3-10
tags: |
type=sha,enable=true
- id: build_and_export
- id: build
name: Build and Push Docker Image
uses: docker/build-push-action@v4
with:
Expand All @@ -40,12 +40,13 @@ jobs:
file: Dockerfile.focal-python3-10
cache-from: type=gha
cache-to: type=gha,mode=max
outputs: type=docker,dest=/tmp/focal-base.tar
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: focal-base
path: /tmp/focal-base.tar
push: true
# outputs: type=docker,dest=/tmp/focal-base.tar
# - name: Upload artifact
# uses: actions/upload-artifact@v3
# with:
# name: focal-base
# path: /tmp/focal-base.tar
- id: image_ref
name: Image full reference
run: |-
Expand Down Expand Up @@ -75,7 +76,7 @@ jobs:
ghcr.io/beaglesinspace/supabase-spilo/extensions
tags: |
type=sha,enable=true
- id: build_and_export
- id: build
name: Build and Push Docker Image
uses: docker/build-push-action@v4
with:
Expand All @@ -85,12 +86,13 @@ jobs:
target: extensions
cache-from: type=gha
cache-to: type=gha,mode=max
outputs: type=docker,dest=/tmp/extensions.tar
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: extensions
path: /tmp/extensions.tar
push: true
# outputs: type=docker,dest=/tmp/extensions.tar
# - name: Upload artifact
# uses: actions/upload-artifact@v3
# with:
# name: extensions
# path: /tmp/extensions.tar
- id: image_ref
name: Image full reference
run: |-
Expand Down Expand Up @@ -122,15 +124,15 @@ jobs:
ghcr.io/beaglesinspace/supabase-spilo/spilo-focal
tags: |
type=sha,enable=true
- name: Download base image
uses: actions/download-artifact@v3
with:
name: focal-base
path: /tmp
- name: Load image from artifact
run: |-
docker load -i /tmp/focal-base.tar
- id: build_and_export
# - name: Download base image
# uses: actions/download-artifact@v3
# with:
# name: focal-base
# path: /tmp
# - name: Load image from artifact
# run: |-
# docker load -i /tmp/focal-base.tar
- id: build
name: Build and Push Docker Image
uses: docker/build-push-action@v4
with:
Expand All @@ -143,12 +145,13 @@ jobs:
BASE_IMAGE=${{ needs.build-base.outputs.image }}
DEB_PG_SUPPORTED_VERSIONS="15"
TIMESCALEDB=2.11.0
outputs: type=docker,dest=/tmp/spilo.tar
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: spilo
path: /tmp/spilo.tar
push: true
# outputs: type=docker,dest=/tmp/spilo.tar
# - name: Upload artifact
# uses: actions/upload-artifact@v3
# with:
# name: spilo
# path: /tmp/spilo.tar
- id: image_ref
name: Image full reference
run: |-
Expand Down Expand Up @@ -180,16 +183,16 @@ jobs:
tags: |
type=sha,enable=true
type=schedule,pattern={{date 'YYYYMMDD-hhmmss'}}
- name: Download images
uses: actions/download-artifact@v3
with:
path: /tmp
- name: Load image from artifact
run: |-
docker load -i /tmp/spilo.tar
docker load -i /tmp/extensions.tar
docker image ls -a
- id: build_and_push
# - name: Download images
# uses: actions/download-artifact@v3
# with:
# path: /tmp
# - name: Load image from artifact
# run: |-
# docker load -i /tmp/spilo.tar
# docker load -i /tmp/extensions.tar
# docker image ls -a
- id: build
name: Build and Push Docker Image
uses: docker/build-push-action@v4
with:
Expand Down

0 comments on commit b2ce026

Please sign in to comment.