Skip to content

chore: add rcnetv3 to networks #384

chore: add rcnetv3 to networks

chore: add rcnetv3 to networks #384

name: Delete K8S PR sub-namespace
on:
pull_request:
types: [ closed ]
jobs:
dispatch-pr-hns-deletion-events:
if: github.event.pull_request.merged == true
runs-on: ubuntu-22.04
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b
- uses: ./.github/actions/fetch-secrets
with:
role_name: "arn:aws:iam::308190735829:role/gh-babylon-gateway-secrets-read-access"
app_name: "babylon-gateway"
step_name: "dispatch-pr-hns-deletion-events"
secret_prefix: "CF_GITHUB_WORKER"
secret_name: "github-actions/radixdlt/babylon-gateway/cloudflare"
parse_json: true
- name: Get PR HSN
run: |
pull_number=${{ github.event.number }}
echo "NAMESPACE=ng-babylon-pr-$pull_number" >> $GITHUB_ENV
echo "EVENT_TYPE=babylon_pr_hsn" >> $GITHUB_ENV
- name: Trigger pr deletion event ${{ github.ref }}
run: |
curl --silent --show-error --fail --location --request POST 'https://github-worker.radixdlt.com/repos/radixdlt/${{secrets.DISPATCH_REPO}}/dispatches' \
--header 'Accept: application/vnd.github.v3+json' \
--header 'Authorization: Basic ${{env.CF_GITHUB_WORKER_ENCODED_BASIC_AUTH}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"event_type": "${{env.EVENT_TYPE}}",
"client_payload": {
"hns_pr_sub_namespace": "${{env.NAMESPACE}}"
}
}'