Skip to content

Commit 08a5401

Browse files
committed
feature(ci): Add wait-for-hydra
1 parent 0776e67 commit 08a5401

File tree

1 file changed

+18
-11
lines changed

1 file changed

+18
-11
lines changed

Diff for: .github/workflows/release-ghcr.yml

+18-11
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ env:
1616

1717
jobs:
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/[email protected]
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
@@ -67,6 +64,16 @@ jobs:
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/[email protected]
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

Comments
 (0)