Skip to content

Commit 5297087

Browse files
committed
chore: removed peter-evans/create-pull-request, added permission comment
1 parent e72b533 commit 5297087

2 files changed

Lines changed: 26 additions & 15 deletions

File tree

.github/workflows/build-wasm.yml

Lines changed: 25 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -92,18 +92,28 @@ jobs:
9292
9393
- name: Create Pull Request
9494
if: steps.check-branch.outputs.skip != 'true' && steps.git-check.outputs.changes == 'true'
95-
uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1
96-
with:
97-
token: ${{ secrets.GITHUB_TOKEN }}
98-
commit-message:
99-
'chore: update SQLite Wasm binaries from ${{ steps.resolve-ref.outputs.sqlite_ref }}
100-
(${{ steps.resolve-ref.outputs.sqlite_sha }})'
101-
title:
102-
'chore: update SQLite Wasm binaries from ${{ steps.resolve-ref.outputs.sqlite_ref }}'
103-
body: |
104-
This PR updates the SQLite Wasm binaries in `src/bin` by building them from SQLite reference `${{ steps.resolve-ref.outputs.sqlite_ref }}` (commit `${{ steps.resolve-ref.outputs.sqlite_sha }}`).
105-
106-
Triggered by manual workflow dispatch.
107-
branch: ${{ steps.resolve-ref.outputs.branch_name }}
108-
base: main
109-
delete-branch: true
95+
env:
96+
BRANCH_NAME: ${{ steps.resolve-ref.outputs.branch_name }}
97+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
98+
SQLITE_REF: ${{ steps.resolve-ref.outputs.sqlite_ref }}
99+
SQLITE_SHA: ${{ steps.resolve-ref.outputs.sqlite_sha }}
100+
run: |
101+
git config user.name "github-actions[bot]"
102+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
103+
104+
git switch -c "$BRANCH_NAME"
105+
git commit -m "chore: update SQLite Wasm binaries from ${SQLITE_REF} (${SQLITE_SHA})"
106+
gh auth setup-git
107+
git push origin "HEAD:${BRANCH_NAME}"
108+
109+
cat > pr-body.md <<EOF
110+
This PR updates the SQLite Wasm binaries in \`src/bin\` by building them from SQLite reference \`${SQLITE_REF}\` (commit \`${SQLITE_SHA}\`).
111+
112+
Triggered by manual workflow dispatch.
113+
EOF
114+
115+
gh pr create \
116+
--base main \
117+
--head "$BRANCH_NAME" \
118+
--title "chore: update SQLite Wasm binaries from ${SQLITE_REF}" \
119+
--body-file pr-body.md

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ jobs:
5555
name: Zizmor GitHub Actions check
5656
runs-on: ubuntu-latest
5757
permissions:
58+
# Needed by zizmor online audits to inspect workflow/action metadata.
5859
actions: read
5960
contents: read
6061
security-events: write

0 commit comments

Comments
 (0)