Skip to content

Require secrets to be set to run Pages deployment #16

Require secrets to be set to run Pages deployment

Require secrets to be set to run Pages deployment #16

on: [push]
jobs:
check-secrets:
runs-on: ubuntu-latest
outputs:
has-secrets: ${{ steps.has-secrets.outputs.defined }}
steps:
- name: Check if deployment secrets are available
id: has-secrets
shell: bash
run: |
if [ "${{ secrets.CLOUDFLARE_API_TOKEN }}" != '' ] && [ "${{ secrets.CLOUDFLARE_ACCOUNT_ID }}" != '' ] && [ "${{ secrets.CLOUDFLARE_INTEG_MAINNET_PROJECT }}" != '' ]; then
echo "defined=true" >> $GITHUB_OUTPUT;
else
echo "defined=false" >> $GITHUB_OUTPUT;
fi
deploy-mainnet:

Check failure on line 17 in .github/workflows/integration-deployment.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/integration-deployment.yaml

Invalid workflow file

The workflow is not valid. .github/workflows/integration-deployment.yaml (Line: 17, Col: 3): Error calling workflow 'sealer3/otterscan/.github/workflows/pages-deployment.yaml@bb3d882c3426fbd2d7e6a11a91c55cde041ac640'. The nested job 'deploy-cloudflare' is requesting 'deployments: write', but is only allowed 'deployments: none'.
uses: ./.github/workflows/pages-deployment.yaml
if: ${{ needs.check-secrets.outputs.has-secrets == 'true' }}
needs: [check-secrets]
secrets:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: ${{ secrets.CLOUDFLARE_INTEG_MAINNET_PROJECT }}
viteConfigJson: ${{ secrets.CLOUDFLARE_INTEG_MAINNET_SETTINGS }}
deploy-gnosis:
uses: ./.github/workflows/pages-deployment.yaml
if: ${{ needs.check-secrets.outputs.has-secrets == 'true' }}
needs: [check-secrets]
secrets:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: ${{ secrets.CLOUDFLARE_INTEG_GNOSIS_PROJECT }}
viteConfigJson: ${{ secrets.CLOUDFLARE_INTEG_GNOSIS_SETTINGS }}
deploy-op-mainnet:
uses: ./.github/workflows/pages-deployment.yaml
if: ${{ needs.check-secrets.outputs.has-secrets == 'true' }}
needs: [check-secrets]
secrets:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: ${{ secrets.CLOUDFLARE_INTEG_OP_MAINNET_PROJECT }}
viteConfigJson: ${{ secrets.CLOUDFLARE_INTEG_OP_MAINNET_SETTINGS }}
deploy-e3-sepolia:
uses: ./.github/workflows/pages-deployment.yaml
if: ${{ needs.check-secrets.outputs.has-secrets == 'true' }}
needs: [check-secrets]
secrets:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: ${{ secrets.CLOUDFLARE_INTEG_E3_SEPOLIA_PROJECT }}
viteConfigJson: ${{ secrets.CLOUDFLARE_INTEG_E3_SEPOLIA_SETTINGS }}