16
16
17
17
jobs :
18
18
build :
19
- name : " Upload to ghcr.io "
19
+ name : " Build image "
20
20
runs-on : ubuntu-latest
21
21
steps :
22
22
- name : Install Nix with good defaults
@@ -36,19 +36,16 @@ jobs:
36
36
- name : Checkout repository
37
37
uses : actions/checkout@v3
38
38
39
+ - name : Wait for Hydra
40
+ uses : input-output-hk/actions/wait-for-hydra@latest
41
+ with :
42
+ check : ci/hydra-build:x86_64-linux.required
43
+
39
44
- name : Download image from cache
40
45
run :
41
46
nix build --builders "" --max-jobs 0 .#cardano-db-sync-docker
42
47
43
- - name : Log in to ghcr.io
44
-
45
- with :
46
- registry : ${{ env.REGISTRY }}
47
- username : ${{ github.actor }}
48
- password : ${{ secrets.GITHUB_TOKEN }}
49
-
50
- - name : Upload to ghcr.io
51
- if : ${{ github.ref_type == 'tags' || github.event_name == 'release' }}
48
+ - name : Load image
52
49
run : |
53
50
# Downcase the package repository, because docker reference
54
51
# are required to be lower case
67
64
docker image tag \
68
65
cardano-db-sync:latest \
69
66
"${IMAGE_REF}:latest"
70
- # Push the tags above
67
+
68
+ - name : Log in to ghcr.io
69
+
70
+ with :
71
+ registry : ${{ env.REGISTRY }}
72
+ username : ${{ github.actor }}
73
+ password : ${{ secrets.GITHUB_TOKEN }}
74
+
75
+ - name : Upload to ghcr.io
76
+ if : ${{ github.ref_type == 'tags' || github.event_name == 'release' }}
77
+ run : |
71
78
docker push "${IMAGE_REF}:${IMAGE_TAG}"
72
79
docker push "${IMAGE_REF}:latest"
0 commit comments