Skip to content

Commit 41b193f

Browse files
authored
build: add workflow for triggering terraform registry sync (#5484)
1 parent dcac13f commit 41b193f

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: Trigger Terraform Registry sync
2+
on:
3+
workflow_dispatch:
4+
5+
jobs:
6+
trigger-terraform-registry-sync:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v4
10+
- name: Run sync
11+
run: ./scripts/trigger-terraform-registry-sync
12+
env:
13+
TERRAFORM_REGISTRY_COOKIE: ${{ secrets.TERRAFORM_REGISTRY_COOKIE }}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/usr/bin/env bash
2+
3+
set -e
4+
5+
if [ -z "${TERRAFORM_REGISTRY_COOKIE}" ]; then
6+
echo "TERRAFORM_REGISTRY_COOKIE is not set."
7+
exit 1
8+
fi
9+
10+
curl -X POST https://registry.terraform.io/github/providers/cloudflare/cloudflare/resync \
11+
-H 'Content-Type: application/vnd.api+json' \
12+
--cookie $TERRAFORM_REGISTRY_COOKIE

0 commit comments

Comments
 (0)