Skip to content

Commit

Permalink
ci(main): fix potential script injection (#890)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcusrbrown authored Jan 23, 2025
1 parent b1d6d43 commit 56333cc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ jobs:
release:
name: Release
if: github.repository == 'bfra-me/works'
env:
PUBLISH_REF: ${{ github.head_ref }}
needs:
- ci
permissions:
Expand All @@ -64,14 +66,14 @@ jobs:
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
ref: ${{ github.head_ref }}
ref: ${{ env.PUBLISH_REF }}
token: ${{ steps.get-workflow-access-token.outputs.token }}

- name: Prepare job
uses: ./.github/actions/pnpm-install

- name: Perform a dry run of `pnpm publish`
run: pnpm -r publish --dry-run --publish-branch ${{ github.head_ref}}
run: pnpm -r publish --dry-run --publish-branch ${{ env.PUBLISH_REF }}

- name: Create Release Pull Request or Publish to npm
if: github.ref == 'refs/heads/main'
Expand Down

0 comments on commit 56333cc

Please sign in to comment.