Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Narrow web deploy Cloudflare secrets

Manav Rathi0e1c2596a7ed
diff --git a/.github/actions/deploy-web-app/action.yml b/.github/actions/deploy-web-app/action.yml
index 7a134d451a..9276fe7ef0 100644
--- a/.github/actions/deploy-web-app/action.yml
+++ b/.github/actions/deploy-web-app/action.yml
@@ -8,6 +8,12 @@ inputs:
output:
description: "Build output directory within web/apps/<app>"
default: "out"
+ account-id:
+ description: "Cloudflare account ID"
+ required: true
+ api-token:
+ description: "Cloudflare API token"
+ required: true
runs:
using: "composite"
@@ -20,6 +26,6 @@ runs:
- name: Publish ${{ inputs.app }}
uses: cloudflare/wrangler-action@v3
with:
- accountId: ${{ env.CLOUDFLARE_ACCOUNT_ID }}
- apiToken: ${{ env.CLOUDFLARE_API_TOKEN }}
+ accountId: ${{ inputs.account-id }}
+ apiToken: ${{ inputs.api-token }}
command: pages deploy --project-name=ente --commit-dirty=true --branch=deploy/${{ inputs.app }} web/apps/${{ inputs.app }}/${{ inputs.output }}
diff --git a/.github/workflows/web-deploy.yml b/.github/workflows/web-deploy.yml
index 160764c9bb..31c6e886ca 100644
--- a/.github/workflows/web-deploy.yml
+++ b/.github/workflows/web-deploy.yml
@@ -31,10 +31,6 @@ jobs:
run:
working-directory: web
- env:
- CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
- CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
-
steps:
- name: Checkout
uses: actions/checkout@v6
@@ -66,64 +62,90 @@ jobs:
uses: ./.github/actions/deploy-web-app
with:
app: photos
+ account-id: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
+ api-token: ${{ secrets.CLOUDFLARE_API_TOKEN }}
- name: Deploy albums
uses: ./.github/actions/deploy-web-app
with:
app: albums
+ account-id: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
+ api-token: ${{ secrets.CLOUDFLARE_API_TOKEN }}
- name: Deploy accounts
uses: ./.github/actions/deploy-web-app
with:
app: accounts
+ account-id: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
+ api-token: ${{ secrets.CLOUDFLARE_API_TOKEN }}
- name: Deploy auth
uses: ./.github/actions/deploy-web-app
with:
app: auth
+ account-id: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
+ api-token: ${{ secrets.CLOUDFLARE_API_TOKEN }}
- name: Deploy legacy
uses: ./.github/actions/deploy-web-app
with:
app: legacy
+ account-id: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
+ api-token: ${{ secrets.CLOUDFLARE_API_TOKEN }}
- name: Deploy cast
uses: ./.github/actions/deploy-web-app
with:
app: cast
+ account-id: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
+ api-token: ${{ secrets.CLOUDFLARE_API_TOKEN }}
- name: Deploy payments
uses: ./.github/actions/deploy-web-app
with:
app: payments
+ account-id: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
+ api-token: ${{ secrets.CLOUDFLARE_API_TOKEN }}
output: dist
- name: Deploy locker
uses: ./.github/actions/deploy-web-app
with:
app: locker
+ account-id: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
+ api-token: ${{ secrets.CLOUDFLARE_API_TOKEN }}
- name: Deploy share
uses: ./.github/actions/deploy-web-app
with:
app: share
+ account-id: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
+ api-token: ${{ secrets.CLOUDFLARE_API_TOKEN }}
- name: Deploy memories
uses: ./.github/actions/deploy-web-app
with:
app: memories
+ account-id: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
+ api-token: ${{ secrets.CLOUDFLARE_API_TOKEN }}
- name: Deploy paste
uses: ./.github/actions/deploy-web-app
with:
app: paste
+ account-id: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
+ api-token: ${{ secrets.CLOUDFLARE_API_TOKEN }}
- name: Deploy embed
uses: ./.github/actions/deploy-web-app
with:
app: embed
+ account-id: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
+ api-token: ${{ secrets.CLOUDFLARE_API_TOKEN }}
- name: Deploy ensu
uses: ./.github/actions/deploy-web-app
with:
app: ensu
+ account-id: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
+ api-token: ${{ secrets.CLOUDFLARE_API_TOKEN }}