Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 6 additions & 29 deletions .github/workflows/deploy-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,35 +8,12 @@
- 'ui/**'
- '.github/workflows/deploy-pages.yml'

jobs:
get-credentials:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
outputs:
cloudflare_token: ${{ steps.creds.outputs.cloudflare_token }}
account_id: ${{ steps.creds.outputs.account_id }}
steps:
- uses: actions/checkout@v4
with:
repository: CHITTYOS/chittyops
sparse-checkout: .github/actions/getchitty-creds
path: .chittyops

- name: Fetch ephemeral credentials
id: creds
uses: ./.chittyops/.github/actions/getchitty-creds
with:
purpose: 'pages-deploy'
service: 'chittycommand-ui'
permissions:
contents: read

jobs:
deploy:
needs: get-credentials
runs-on: ubuntu-latest
permissions:
contents: read
deployments: write
steps:
- uses: actions/checkout@v4

Expand All @@ -55,9 +32,9 @@
working-directory: ui

- name: Deploy to Cloudflare Pages
uses: cloudflare/wrangler-action@da0e0dfe58b7a431659754fdf3f186c529afbe65 # v3
uses: cloudflare/wrangler-action@v3

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow Medium

Unpinned 3rd party Action 'Deploy Pages' step
Uses Step
uses 'cloudflare/wrangler-action' with ref 'v3', not a pinned commit hash
with:
apiToken: ${{ needs.get-credentials.outputs.cloudflare_token }}
accountId: ${{ needs.get-credentials.outputs.account_id }}
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: pages deploy dist --project-name=chittycommand-ui
workingDirectory: ui
4 changes: 3 additions & 1 deletion .github/workflows/deploy-worker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@ on:

permissions:
contents: read
id-token: write

jobs:
deploy:
uses: CHITTYOS/chittyops/.github/workflows/reusable-worker-deploy.yml@main
with:
service_name: chittycommand
secrets:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
Loading