From e9a573b0017b6c8213f4791c10b28efc0a31a160 Mon Sep 17 00:00:00 2001 From: PhilWindle Date: Tue, 18 Feb 2025 15:10:13 +0000 Subject: [PATCH] First attempt --- .github/workflows/nightly-masternet-deploy.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/nightly-masternet-deploy.yml b/.github/workflows/nightly-masternet-deploy.yml index 88f5bf8a4b08..19adf2f79b5a 100644 --- a/.github/workflows/nightly-masternet-deploy.yml +++ b/.github/workflows/nightly-masternet-deploy.yml @@ -20,8 +20,16 @@ jobs: - name: Get latest published commit id: get_commit run: | - COMMIT=$(curl -s https://registry.hub.docker.com/v2/repositories/aztecprotocol/aztec/tags/master | jq ".digest" | tr -d '"') - echo "COMMIT=$COMMIT" >> $GITHUB_OUTPUT + COMMIT=$(git rev-parse HEAD) + TAGS=$(curl -s https://registry.hub.docker.com/v2/repositories/aztecprotocol/aztec/tags/$COMMIT-amd64) + if [[ "$TAGS" != *"not found"* ]]; then + DIGEST=$(echo $TAGS | jq -r '.images[] | select(.architecture=="amd64") | .digest' | tr -d '"') + echo "Deploying digest: $DIGEST" + echo "COMMIT=$DIGEST" >> $GITHUB_OUTPUT + else + echo "Commit $COMMIT not published to docker hub" + exit 1 + fi deploy-network: needs: get-latest-commit