Skip to content

Commit

Permalink
TMP: load image when building
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinMind committed Jun 26, 2024
1 parent fd995ef commit 1a9a3f0
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 10 deletions.
1 change: 1 addition & 0 deletions .github/actions/build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ runs:
DOCKER_TAG: ${{ steps.tag.outputs.tag }}
with:
targets: app
load: true
set: |
*.output=type=docker,dest=${{ steps.tar.outputs.path }}
Expand Down
20 changes: 20 additions & 0 deletions .github/actions/load/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: 'Docker Load image from tar file'
description: 'Loads a docker image from a tar file'
inputs:
version:
required: true
description: "The docker image version you want to load"

runs:
using: "composite"
steps:
- uses: actions/download-artifact@v4
with:
name: ${{ inputs.version }}
path: /tmp/

- name: Load image
shell: bash
run: |
docker load < /tmp/${{ inputs.version }}
docker image ls
12 changes: 2 additions & 10 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,8 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: actions/download-artifact@v4
- uses: ./.github/actions/load
with:
name: ${{ needs.build.outputs.version }}
path: /tmp/

- name: Load image
shell: bash
run: |
docker load < /tmp/${{ needs.build.outputs.version }}
docker image ls
version: ${{ needs.build.outputs.version }}


0 comments on commit 1a9a3f0

Please sign in to comment.