Skip to content

Commit f632796

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

File tree

1 file changed

+19
-11
lines changed

1 file changed

+19
-11
lines changed

.github/workflows/release-ghcr.yml

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,11 @@ on:
1313

1414
env:
1515
REGISTRY: ghcr.io
16+
GH_TOKEN: ${{ github.token }}
1617

1718
jobs:
1819
build:
19-
name: "Upload to ghcr.io"
20+
name: "Build image"
2021
runs-on: ubuntu-latest
2122
steps:
2223
- name: Install Nix with good defaults
@@ -36,19 +37,16 @@ jobs:
3637
- name: Checkout repository
3738
uses: actions/checkout@v3
3839

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+
3945
- name: Download image from cache
4046
run:
4147
nix build --builders "" --max-jobs 0 .#cardano-db-sync-docker
4248

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' }}
49+
- name: Load image
5250
run: |
5351
# Downcase the package repository, because docker reference
5452
# are required to be lower case
@@ -67,6 +65,16 @@ jobs:
6765
docker image tag \
6866
cardano-db-sync:latest \
6967
"${IMAGE_REF}:latest"
70-
# Push the tags above
68+
69+
- name: Log in to ghcr.io
70+
uses: docker/[email protected]
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: |
7179
docker push "${IMAGE_REF}:${IMAGE_TAG}"
7280
docker push "${IMAGE_REF}:latest"

0 commit comments

Comments
 (0)