diff --git a/.github/workflows/ddn-assets.yaml b/.github/workflows/ddn-assets.yaml index a49f9d1c..b164edc6 100644 --- a/.github/workflows/ddn-assets.yaml +++ b/.github/workflows/ddn-assets.yaml @@ -4,6 +4,11 @@ on: push: branches: - "main" + - "vishnu/cps-1079-build-and-push-ndc-hubdata-servercommit-sha-docker-images" + +env: + DATA_TAG: data.$GITHUB_SHA + DDN_ASSETS_VERSION: v0.1.0 jobs: generate: @@ -31,7 +36,7 @@ jobs: pushd docker/data echo "Downloading ddn-assets" - wget https://github.com/hasura/ddn-assets/releases/download/v0.1.0/ddn-assets + wget https://github.com/hasura/ddn-assets/releases/download/$DDN_ASSETS_VERSION/ddn-assets chmod +x ddn-assets # TODO: get rid of this after fixing https://github.com/hasura/ddn-assets/issues/7 @@ -40,11 +45,11 @@ jobs: echo "Running ddn-assets" ./ddn-assets generate - docker build -t ghcr.io/hasura/ndc-hub:data.$GITHUB_SHA . --push + docker build -t ghcr.io/hasura/ndc-hub:$DATA_TAG . --push popd - name: Build and push data server image run: | pushd docker/server - docker build -t ghcr.io/hasura/ndc-hub:data-server.$GITHUB_SHA . --push + docker build --build-arg DATA_TAG=$DATA_TAG -t ghcr.io/hasura/ndc-hub:data-server.$GITHUB_SHA . --push popd