Skip to content

Add exponential backoff to Cloudflare API calls #27

Add exponential backoff to Cloudflare API calls

Add exponential backoff to Cloudflare API calls #27

Workflow file for this run

---
name: clean
on:
pull_request:
types:
- closed
branches:
- master
env:
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CF_ACCOUNT_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
WRANGLER_SEND_METRICS: false
OWNER: ${{ github.repository_owner }}
REPOSITORY: ${{ github.repository }}
BRANCH: ${{ github.head_ref }}
CUSTOM_DOMAIN: nephelai.io
jobs:
clean:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install utilities
run: sudo apt-get install -y jq httpie make
- name: Build project
run: make build
- name: Set worker name envvar
run: echo "WORKER=${REPOSITORY/$OWNER\//}-${BRANCH}-${GITHUB_WORKFLOW}" >> $GITHUB_ENV
- name: Set worker fqdn envvar
run: echo "FQDN=${WORKER}.${CUSTOM_DOMAIN}" >> $GITHUB_ENV
- name: Set worker dns content envvar
run: echo "CONTENT=8.8.8.8" >> $GITHUB_ENV
- name: Destroy Cloudflare Worker
run: |
make run -- delete \
--verbose \
--name "$WORKER"