From 8a618f3e06cf1372e57b17cbffad1db030f74b3a Mon Sep 17 00:00:00 2001 From: rndquu Date: Wed, 13 Mar 2024 18:24:55 +0300 Subject: [PATCH] ci: pass cloudflare credentials --- .github/workflows/build.yml | 10 +++++++--- .github/workflows/init.yml | 15 +++++++++++++++ 2 files changed, 22 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/init.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 84674e1..11dcb38 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,9 +1,10 @@ name: Build & Deploy on: - push: - pull_request: - workflow_dispatch: + workflow_run: + workflows: ["Init"] + types: + - completed permissions: contents: read @@ -28,6 +29,7 @@ jobs: yarn yarn build env: # Set environment variables for the build + FRONTEND_URL: "https://onboard.ubq.fi" SUPABASE_URL: "https://wfzpewmlyiozupulbuur.supabase.co" SUPABASE_ANON_KEY: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6IndmenBld21seWlvenVwdWxidXVyIiwicm9sZSI6ImFub24iLCJpYXQiOjE2OTU2NzQzMzksImV4cCI6MjAxMTI1MDMzOX0.SKIL3Q0NOBaMehH0ekFspwgcu3afp3Dl9EDzPqs1nKs" @@ -39,4 +41,6 @@ jobs: output_directory: "static" current_branch: ${{ github.ref_name }} pull_request_number: ${{ github.event.pull_request.number }} + cloudflare_account_id: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} + cloudflare_api_token: ${{ secrets.CLOUDFLARE_API_TOKEN }} commit_sha: ${{ github.event.pull_request.head.sha }} diff --git a/.github/workflows/init.yml b/.github/workflows/init.yml new file mode 100644 index 0000000..195cd29 --- /dev/null +++ b/.github/workflows/init.yml @@ -0,0 +1,15 @@ +# Initializes the "build and deploy" workflow to have access to github secrets in that workflow +name: Init + +on: + push: + pull_request: + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-22.04 + steps: + - name: Init + run: | + echo "Initialized"