|
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 |
@@ -53,34 +54,48 @@ jobs: |
53 | 54 | echo "REPO_OWNER=${REPO_OWNER}" >> "$GITHUB_ENV" |
54 | 55 | echo "IMAGE_TAG=${IMAGE_TAG}" >> "$GITHUB_ENV" |
55 | 56 |
|
| 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 | +
|
56 | 77 | - name: Upload ${{ github.actor }}/cardano-db-sync |
57 | 78 | if: ${{ github.ref_type == 'tags' || github.event_name == 'release' }} |
58 | 79 | run: | |
59 | | - # Download the image from the nix binary cachhe |
60 | | - nix build --builders "" --max-jobs 0 .#cardano-db-sync-docker |
61 | | -
|
62 | 80 | # Push the image |
63 | 81 | skopeo copy \ |
64 | | - docker-archive:./result \ |
| 82 | + docker-archive:./result-cardano-db-sync \ |
65 | 83 | docker://ghcr.io/${REPO_OWNER}/cardano-db-sync:$IMAGE_TAG |
66 | 84 |
|
67 | 85 | # Also tag it as latest |
68 | 86 | skopeo copy \ |
69 | | - docker-archive:./result \ |
| 87 | + docker-archive:./result-cardano-db-sync \ |
70 | 88 | docker://ghcr.io/${REPO_OWNER}/cardano-db-sync:latest |
71 | 89 |
|
72 | 90 | - name: Upload ${{ github.actor }}/cardano-smash-server |
73 | 91 | if: ${{ github.ref_type == 'tags' || github.event_name == 'release' }} |
74 | 92 | run: | |
75 | | - # Download the image from the nix binary cachhe |
76 | | - nix build --builders "" --max-jobs 0 .#cardano-smash-server-docker |
77 | | -
|
78 | 93 | # Push the image |
79 | 94 | skopeo copy \ |
80 | | - docker-archive:./result \ |
| 95 | + docker-archive:./result-cardano-smash-server \ |
81 | 96 | docker://ghcr.io/${REPO_OWNER}/cardano-smash-server:$IMAGE_TAG |
82 | 97 |
|
83 | 98 | # Also tag it as latest |
84 | 99 | skopeo copy \ |
85 | | - docker-archive:./result \ |
| 100 | + docker-archive:./result-cardano-smash-server \ |
86 | 101 | docker://ghcr.io/${REPO_OWNER}/cardano-smash-server:latest |
0 commit comments