From 1eec0f5f16d86e0fce947b0b29db0037d44e0373 Mon Sep 17 00:00:00 2001 From: Sven Sauleau Date: Wed, 22 Feb 2023 17:16:20 +0000 Subject: [PATCH] fix deploy retrieve D1 --- .github/workflows/deploy.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 95260db..24d4cb7 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -97,8 +97,12 @@ jobs: - name: retrieve D1 database uses: cloudflare/wrangler-action@2.0.0 with: - command: d1 list | grep "wildebeest-${{ env.NAME_SUFFIX }}\s" | awk '{print "d1_id="$2}' >> $GITHUB_ENV + command: d1 list --json | jq -r '.[] | select(.name == "wildebeest-${{ env.NAME_SUFFIX }}") | .uuid' | awk '{print "d1_id="$1}' >> $GITHUB_ENV apiToken: ${{ secrets.CF_API_TOKEN }} + preCommands: | + echo "*** pre commands ***" + apt-get update && apt-get -y install jq + echo "******" env: CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }}