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