diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 67d7c302..8a58a822 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,13 +31,13 @@ jobs: ALLOW_INTROSPECTION: true CACHE_ENABLED: false CARDANO_GRAPHQL_VERSION: ${{ github.sha }} - + - name: 🔨 Build Cardano GraphQL Server Dockerfile uses: docker/build-push-action@v2 with: - cache-from: type=registry,ref=inputoutput/cardano-graphql:master + cache-from: type=registry,ref=cardanofoundation/cardano-graphql-server:master cache-to: type=inline - tags: inputoutput/cardano-graphql:${{ github.sha }} + tags: cardanofoundation/cardano-graphql:${{ github.sha }} target: server - name: 🔨 Build Cardano GraphQL Hasura Dockerfile @@ -45,4 +45,12 @@ jobs: with: context: ./packages/api-cardano-db-hasura/hasura file: ./packages/api-cardano-db-hasura/hasura/Dockerfile - tags: inputoutput/cardano-graphql-hasura:${{ github.sha }} + tags: cardanofoundation/cardano-graphql-hasura:${{ github.sha }} + + - name: 🔨 Build Cardano GraphQL Background Dockerfile + uses: docker/build-push-action@v2 + with: + cache-from: type=registry,ref=cardanofoundation/cardano-graphql-background:master + cache-to: type=inline + tags: cardanofoundation/cardano-graphql:${{ github.sha }} + target: background diff --git a/.github/workflows/post_integration.yml b/.github/workflows/post_integration.yml index c8c837b8..637558b9 100644 --- a/.github/workflows/post_integration.yml +++ b/.github/workflows/post_integration.yml @@ -31,8 +31,10 @@ jobs: - name: 📝 Base Variables id: base-variables run: | - echo ::set-output name=cardano-graphql-server-image::cardanofoundation/cardano-graphql + echo ::set-output name=cardano-graphql-image::cardanofoundation/cardano-graphql echo ::set-output name=cardano-graphql-hasura-image::cardanofoundation/cardano-graphql-hasura + echo ::set-output name=cardano-graphql-background-image::cardanofoundation/cardano-graphql-background + echo ::set-output name=cardano-graphql-server-image::cardanofoundation/cardano-graphql-server - name: 🔨 Build and push Cardano GraphQL Server Dockerfile (default) if: ${{ matrix.network == 'mainnet' }} @@ -41,9 +43,9 @@ jobs: build-args: NETWORK=${{ matrix.network }} context: . push: true - tags: ${{ steps.base-variables.outputs.cardano-graphql-server-image }}:${{ github.sha }}, ${{ steps.base-variables.outputs.cardano-graphql-server-image }}:master + tags: ${{ steps.base-variables.outputs.cardano-graphql-image }}:${{ github.sha }}, ${{ steps.base-variables.outputs.cardano-graphql-image }}:master target: server - cache-from: type=registry,ref=${{ steps.base-variables.outputs.cardano-graphql-server-image }}:latest + cache-from: type=registry,ref=${{ steps.base-variables.outputs.cardano-graphql-image }}:latest cache-to: type=inline - name: 🔨 Build and push Cardano GraphQL Server Dockerfile (network) @@ -66,5 +68,15 @@ jobs: push: true tags: ${{ steps.base-variables.outputs.cardano-graphql-hasura-image }}:${{ github.sha }}, ${{ steps.base-variables.outputs.cardano-graphql-hasura-image }}:master cache-from: type=registry,ref=${{ steps.base-variables.outputs.cardano-graphql-hasura-image }}:master-${{ matrix.network }} - cache-to: type=inline - + cache-to: type=inline + + - name: 🔨 Build and push Cardano GraphQL Background Dockerfile (network) + uses: docker/build-push-action@v2 + with: + build-args: NETWORK=${{ matrix.network }} + context: . + push: true + tags: ${{ steps.base-variables.outputs.cardano-graphql-background-image }}:${{ github.sha }}-${{ matrix.network }}, ${{ steps.base-variables.outputs.cardano-graphql-background-image }}:master-${{ matrix.network }} + target: server + cache-from: type=registry,ref=${{ steps.base-variables.outputs.cardano-graphql-background-image }}:master-${{ matrix.network }} + cache-to: type=inline diff --git a/.github/workflows/post_release.yml b/.github/workflows/post_release.yml index 23e10b57..3c161f11 100644 --- a/.github/workflows/post_release.yml +++ b/.github/workflows/post_release.yml @@ -36,17 +36,19 @@ jobs: - name: 📝 Base Variables id: base-variables run: | - echo ::set-output name=cardano-graphql-server-image::cardanofoundation/cardano-graphql + echo ::set-output name=cardano-graphql-image::cardanofoundation/cardano-graphql echo ::set-output name=cardano-graphql-hasura-image::cardanofoundation/cardano-graphql-hasura + echo ::set-output name=cardano-graphql-background-image::cardanofoundation/cardano-graphql-background + echo ::set-output name=cardano-graphql-server-image::cardanofoundation/cardano-graphql-server - name: 🔨 Build and push Cardano GraphQL Server Dockerfile (default) if: ${{ matrix.network == 'mainnet' }} uses: docker/build-push-action@v2 with: - cache-from: type=registry,ref=${{ steps.base-variables.outputs.cardano-graphql-server-image }}:latest + cache-from: type=registry,ref=${{ steps.base-variables.outputs.cardano-graphql-image }}:latest cache-to: type=inline push: true - tags: ${{ steps.base-variables.outputs.cardano-graphql-server-image }}:${{ github.sha }}, ${{ steps.base-variables.outputs.cardano-graphql-server-image }}:${{ github.event.release.tag_name }}, ${{ steps.base-variables.outputs.cardano-graphql-server-image }}:latest + tags: ${{ steps.base-variables.outputs.cardano-graphql-image }}:${{ github.sha }}, ${{ steps.base-variables.outputs.cardano-graphql-image }}:${{ github.event.release.tag_name }}, ${{ steps.base-variables.outputs.cardano-graphql-image }}:latest target: server - name: 🔨 Build and push Cardano GraphQL Server Dockerfile (network tags) @@ -58,6 +60,16 @@ jobs: push: true tags: ${{ steps.base-variables.outputs.cardano-graphql-server-image }}:${{ github.sha }}-${{ matrix.network }}, ${{ steps.base-variables.outputs.cardano-graphql-server-image }}:${{ github.event.release.tag_name }}-${{ matrix.network }}, ${{ steps.base-variables.outputs.cardano-graphql-server-image }}:latest-${{ matrix.network }} target: server + + - name: 🔨 Build and push Cardano GraphQL Server Dockerfile (network tags) + uses: docker/build-push-action@v2 + with: + build-args: NETWORK=${{ matrix.network }} + cache-from: type=registry,ref=${{ steps.base-variables.outputs.cardano-graphql-background-image }}:latest + cache-to: type=inline + push: true + tags: ${{ steps.base-variables.outputs.cardano-graphql-background-image }}:${{ github.sha }}-${{ matrix.network }}, ${{ steps.base-variables.outputs.cardano-graphql-background-image }}:${{ github.event.release.tag_name }}-${{ matrix.network }}, ${{ steps.base-variables.outputs.cardano-graphql-background-image }}:latest-${{ matrix.network }} + target: background - name: 🔨 Build and push Cardano GraphQL Hasura Dockerfile uses: docker/build-push-action@v2 diff --git a/docker-compose.yml b/docker-compose.yml index 71fa29b5..58506f12 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -94,7 +94,7 @@ services: background: build: - cache_from: [ inputoutput/cardano-graphql-background:latest ] + cache_from: [ cardanofoundation/cardano-graphql-background:latest ] context: . target: background image: cardanofoundation/cardano-graphql-background:${CARDANO_GRAPHQL_VERSION:-8.0.1}-${NETWORK:-mainnet}