Skip to content

Commit 76e19a3

Browse files
committed
TMP: load image when building
1 parent fd995ef commit 76e19a3

File tree

4 files changed

+29
-12
lines changed

4 files changed

+29
-12
lines changed

.github/actions/build/action.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ runs:
8686
DOCKER_TAG: ${{ steps.tag.outputs.tag }}
8787
with:
8888
targets: app
89+
load: true
8990
set: |
9091
*.output=type=docker,dest=${{ steps.tar.outputs.path }}
9192

.github/actions/load/action.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: 'Docker Load image from tar file'
2+
description: 'Loads a docker image from a tar file'
3+
inputs:
4+
version:
5+
required: true
6+
description: "The docker image version you want to load"
7+
8+
runs:
9+
using: "composite"
10+
steps:
11+
- uses: actions/download-artifact@v4
12+
with:
13+
name: ${{ inputs.version }}
14+
path: /tmp/
15+
16+
- name: Load image
17+
shell: bash
18+
run: |
19+
docker load < /tmp/${{ inputs.version }}
20+
docker image ls

.github/actions/push/action.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,22 @@ inputs:
1010
username:
1111
required: false
1212
description: "Username for the registry"
13+
registry:
14+
required: false
15+
description: "The registry to push to"
16+
default: "ghcr.io"
1317

1418
runs:
1519
using: "composite"
1620
steps:
1721
- name: Login to Container Registry
1822
uses: docker/login-action@v3
1923
with:
20-
registry: ghcr.io
24+
registry: ${{ inputs.registry }}
2125
username: ${{ inputs.username }}
2226
password: ${{ inputs.password }}
2327

2428
- name: Push Image
2529
shell: bash
2630
run: |
27-
docker image push ${{ inputs.tag }}
31+
docker image push ${{ inputs.registry }}/${{ inputs.tag }}

.github/workflows/push.yml

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -46,16 +46,8 @@ jobs:
4646
steps:
4747
- uses: actions/checkout@v4
4848

49-
- uses: actions/download-artifact@v4
49+
- uses: ./.github/actions/load
5050
with:
51-
name: ${{ needs.build.outputs.version }}
52-
path: /tmp/
53-
54-
- name: Load image
55-
shell: bash
56-
run: |
57-
docker load < /tmp/${{ needs.build.outputs.version }}
58-
docker image ls
59-
51+
version: ${{ needs.build.outputs.version }}
6052

6153

0 commit comments

Comments
 (0)