Skip to content

Commit c5133af

Browse files
committed
feature(ci): Add wait-for-hydra
1 parent 760e223 commit c5133af

File tree

1 file changed

+26
-11
lines changed

1 file changed

+26
-11
lines changed

.github/workflows/release-ghcr.yml

+26-11
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
@@ -53,34 +54,48 @@ jobs:
5354
echo "REPO_OWNER=${REPO_OWNER}" >> "$GITHUB_ENV"
5455
echo "IMAGE_TAG=${IMAGE_TAG}" >> "$GITHUB_ENV"
5556
57+
- name: Wait for Hydra
58+
uses: input-output-hk/actions/wait-for-hydra@latest
59+
with:
60+
check: ci/hydra-build:x86_64-linux.required
61+
62+
- name: Load images
63+
run: |
64+
# Download the images from the nix binary cachhe
65+
nix build \
66+
--builders "" \
67+
--max-jobs 0 \
68+
--out-link result-cardano-db-sync \
69+
.#cardano-db-sync-docker
70+
71+
nix build \
72+
--builders "" \
73+
--max-jobs 0 \
74+
--out-link result-cardano-smash-server
75+
.#cardano-smash-server-docker
76+
5677
- name: Upload ${{ github.actor }}/cardano-db-sync
5778
if: ${{ github.ref_type == 'tags' || github.event_name == 'release' }}
5879
run: |
59-
# Download the image from the nix binary cachhe
60-
nix build --builders "" --max-jobs 0 .#cardano-db-sync-docker
61-
6280
# Push the image
6381
skopeo copy \
64-
docker-archive:./result \
82+
docker-archive:./result-cardano-db-sync \
6583
docker://ghcr.io/${REPO_OWNER}/cardano-db-sync:$IMAGE_TAG
6684
6785
# Also tag it as latest
6886
skopeo copy \
69-
docker-archive:./result \
87+
docker-archive:./result-cardano-db-sync \
7088
docker://ghcr.io/${REPO_OWNER}/cardano-db-sync:latest
7189
7290
- name: Upload ${{ github.actor }}/cardano-smash-server
7391
if: ${{ github.ref_type == 'tags' || github.event_name == 'release' }}
7492
run: |
75-
# Download the image from the nix binary cachhe
76-
nix build --builders "" --max-jobs 0 .#cardano-smash-server-docker
77-
7893
# Push the image
7994
skopeo copy \
80-
docker-archive:./result \
95+
docker-archive:./result-cardano-smash-server \
8196
docker://ghcr.io/${REPO_OWNER}/cardano-smash-server:$IMAGE_TAG
8297
8398
# Also tag it as latest
8499
skopeo copy \
85-
docker-archive:./result \
100+
docker-archive:./result-cardano-smash-server \
86101
docker://ghcr.io/${REPO_OWNER}/cardano-smash-server:latest

0 commit comments

Comments
 (0)