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
10 changes: 8 additions & 2 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
name: CD

on:
workflow_run:
# Deploy runs after CI on push to dev/main only; the branches filter keeps
# fork/PR heads out of this privileged context.
workflow_run: # zizmor: ignore[dangerous-triggers]
workflows: ['CI']
types: [completed]
branches: [dev, main]
Expand Down Expand Up @@ -87,7 +89,11 @@ jobs:
run: pnpm exec clasp push -f

- name: Deploy new version
run: pnpm exec clasp deploy -i "${{ vars.DEPLOYMENT_ID }}" --description "CD deploy from ${{ github.event.workflow_run.head_branch }}@${{ github.event.workflow_run.head_sha }}"
env:
DEPLOYMENT_ID: ${{ vars.DEPLOYMENT_ID }}
HEAD_BRANCH: ${{ github.event.workflow_run.head_branch }}
HEAD_SHA: ${{ github.event.workflow_run.head_sha }}
run: pnpm exec clasp deploy -i "$DEPLOYMENT_ID" --description "CD deploy from ${HEAD_BRANCH}@${HEAD_SHA}"

- name: Set script properties
if: vars.GCP_PROJECT_NUMBER != '' && env.SCRIPT_PROPERTIES != ''
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
pull_request:
branches: [main]

permissions:
contents: read

jobs:
check:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -62,3 +65,6 @@ jobs:

actionlint:
uses: h13/.github/.github/workflows/ci-actionlint.yml@c807de1510e8d223f352555ddcbf6a1a78fe51eb # v3.1.0

zizmor:
uses: h13/.github/.github/workflows/ci-zizmor.yml@c807de1510e8d223f352555ddcbf6a1a78fe51eb # v3.1.0
4 changes: 3 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ on:
tags:
- 'v*'

# publish-node needs contents: write (GitHub Release) and id-token: write
# (npm OIDC trusted publishing). It takes no secrets.
permissions:
contents: write
id-token: write

jobs:
publish:
uses: h13/.github/.github/workflows/publish-node.yml@1e41d76a661e2835b0cf9df2c85d588f9f0308f7 # v3.0.0
secrets: inherit