5
5
6
6
env :
7
7
REGISTRY : ghcr.io
8
- IMAGE_NAME : cosmostat/shapepipe
8
+ IMAGE_NAME : ${{ github.repository }}
9
+ BRANCH : ${{ github.ref }}
9
10
10
11
jobs :
11
12
build-and-push-image :
@@ -24,32 +25,28 @@ jobs:
24
25
username : ${{ github.actor }}
25
26
password : ${{ secrets.GITHUB_TOKEN }}
26
27
28
+ - name : Set up Docker Buildx
29
+ uses : docker/setup-buildx-action@v3
30
+
27
31
- name : Extract metadata (tags, labels) for Docker
28
32
id : meta
29
33
uses : docker/metadata-action@v5
30
34
with :
31
35
images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
32
36
33
- - name : Build and push Docker image
37
+ - name : Build and export to Docker
34
38
uses : docker/build-push-action@v6
35
39
with :
36
- push : true
40
+ load : true
37
41
tags : ${{ steps.meta.outputs.tags }}
38
42
labels : ${{ steps.meta.outputs.labels }}
43
+
44
+ - name : Test
45
+ run : docker run --rm ${{ steps.meta.outputs.tags }} shapepipe_run -c /app/example/config.ini
39
46
40
- test-shapepipe-image :
41
- runs-on : ubuntu-latest
42
- needs : build-and-push-image
43
- steps :
44
- - name : Log in to the Container registry
45
- uses : docker/login-action@v3
47
+ - name : Push
48
+ uses : docker/build-push-action@v6
46
49
with :
47
- registry : ${{ env.REGISTRY }}
48
- username : ${{ github.actor }}
49
- password : ${{ secrets.GITHUB_TOKEN }}
50
-
51
- - name : Pull Docker Image
52
- run : docker pull ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
53
-
54
- - name : Test Shapepipe
55
- run : docker run --rm ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest shapepipe_run -c /app/example/config.ini
50
+ push : true
51
+ tags : ${{ steps.meta.outputs.tags }}
52
+ labels : ${{ steps.meta.outputs.labels }}
0 commit comments