1616
1717jobs :
1818 build :
19- name : " Upload to ghcr.io "
19+ name : " Build image "
2020 runs-on : ubuntu-latest
2121 steps :
2222 - name : Install Nix with good defaults
@@ -36,19 +36,16 @@ jobs:
3636 - name : Checkout repository
3737 uses : actions/checkout@v3
3838
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+
3944 - name : Download image from cache
4045 run :
4146 nix build --builders "" --max-jobs 0 .#cardano-db-sync-docker
4247
43- - name : Log in to ghcr.io
44- uses : docker/login-action@v2.1.0
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
5249 run : |
5350 # Downcase the package repository, because docker reference
5451 # are required to be lower case
6764 docker image tag \
6865 cardano-db-sync:latest \
6966 "${IMAGE_REF}:latest"
70- # Push the tags above
67+
68+ - name : Log in to ghcr.io
69+ uses : docker/login-action@v2.1.0
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 : |
7178 docker push "${IMAGE_REF}:${IMAGE_TAG}"
7279 docker push "${IMAGE_REF}:latest"
0 commit comments