Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update cloudflare/wrangler-action action to v3.3.2 #148

Merged
merged 3 commits into from
Oct 31, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 12 additions & 11 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ jobs:
uses: hashicorp/setup-terraform@v3

- name: Retrieve Terraform State
uses: cloudflare/[email protected].1
uses: cloudflare/[email protected].2
with:
command: kv:namespace list > .kv_namespace_list.json
postCommands: jq -r '.[] | select( .title == "dispoflare-terraform-state" ) | .id' .kv_namespace_list.json | awk '{print "tfstate_kv="$1}' >> $GITHUB_ENV
command: --version
preCommands: npx wrangler kv:namespace list | jq -r '.[] | select( .title == "dispoflare-terraform-state" ) | .id' | awk '{print "tfstate_kv="$1}' >> $GITHUB_ENV
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}

Expand All @@ -26,9 +26,10 @@ jobs:
working-directory: ./.terraform

- name: Download Terraform State
uses: cloudflare/[email protected].1
uses: cloudflare/[email protected].2
with:
command: kv:key get --namespace-id=${{ env.tfstate_kv }} terraform.tfstate > ./.terraform/terraform.tfstate
command: --version
preCommands: npx wrangler kv:key get --namespace-id=${{ env.tfstate_kv }} terraform.tfstate > ./.terraform/terraform.tfstate
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
postCommands: chmod 777 ./.terraform/terraform.tfstate
Expand All @@ -43,16 +44,16 @@ jobs:
TF_VAR_sentry_dsn: ${{ secrets.SENTRY_DSN }}

- name: Init Terraform State
uses: cloudflare/[email protected].1
uses: cloudflare/[email protected].2
if: ${{ env.tfstate_kv == '' }}
with:
command: kv:namespace list > .kv_namespace_list.json
postCommands: jq -r '.[] | select( .title == "dispoflare-terraform-state" ) | .id' .kv_namespace_list.json | awk '{print "tfstate_kv="$1}' >> $GITHUB_ENV
command: --version
preCommands: npx wrangler kv:namespace list | jq -r '.[] | select( .title == "dispoflare-terraform-state" ) | .id' | awk '{print "tfstate_kv="$1}' >> $GITHUB_ENV
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}

- name: Store Terraform State
uses: cloudflare/[email protected].1
uses: cloudflare/[email protected].2
with:
command: kv:key put --namespace-id=${{ env.tfstate_kv }} terraform.tfstate --path=./.terraform/terraform.tfstate
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
Expand All @@ -76,7 +77,7 @@ jobs:
run: npm ci

- name: Publish to Cloudflare Workers
uses: cloudflare/[email protected].1
uses: cloudflare/[email protected].2
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
Expand All @@ -93,7 +94,7 @@ jobs:
run: npm run build

- name: Publish to Cloudflare Pages
uses: cloudflare/[email protected].1
uses: cloudflare/[email protected].2
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
Expand Down