Skip to content

Commit 5e7f91d

Browse files
authored
ci: Fix secret used for publishing (#66)
# What ❔ Uses a dedicated secret for publishing workflows. ## Why ❔ This is necessary because of `GITHUB_TOKEN` limitations.
1 parent 53f8f88 commit 5e7f91d

File tree

4 files changed

+13
-26
lines changed

4 files changed

+13
-26
lines changed

.github/workflows/check-pr-title.yml

Lines changed: 0 additions & 20 deletions
This file was deleted.

.github/workflows/pr-title.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,15 @@ jobs:
1919
env:
2020
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2121

22+
- uses: guibranco/github-status-action-v2@v1.1.13
23+
if: always()
24+
with:
25+
authToken: ${{ secrets.GITHUB_TOKEN }}
26+
state: ${{ (steps.lint_pr_title.outputs.error_message != null) && 'error' || 'success' }}
27+
context: 'conventional-pr-title'
28+
description: PR title ${{ (steps.lint_pr_title.outputs.error_message != null) && 'does not match' || 'matches' }} Conventional Commits spec
29+
sha: ${{ github.event.pull_request.head.sha }}
30+
2231
- uses: marocchino/sticky-pull-request-comment@v2
2332
# When the previous steps fails, the workflow would stop. By adding this
2433
# condition you can continue the execution with the populated error message.
@@ -27,7 +36,7 @@ jobs:
2736
header: pr-title-lint-error
2837
message: |
2938
Hey there! 👋🏼
30-
39+
3140
We require pull request titles to follow the [Conventional Commits specification](https://www.conventionalcommits.org/en/v1.0.0/) and it looks like your proposed title needs to be adjusted.
3241
Examples of valid PR titles:
3342
@@ -36,7 +45,7 @@ jobs:
3645
- ci: Add new workflow for linting
3746
3847
Details:
39-
48+
4049
```
4150
${{ steps.lint_pr_title.outputs.error_message }}
4251
```

.github/workflows/release-please-prepare-branch.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@ jobs:
3838
runs-on: [ubuntu-latest]
3939
name: "release-please: Update version in Cargo.toml"
4040
needs: [check_state]
41-
permissions:
42-
contents: write
4341
if: ${{ needs.check_state.outputs.already_committed != 'true' }}
4442
steps:
4543
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
@@ -65,7 +63,7 @@ jobs:
6563
run: |
6664
git config --global user.email "zksync-era-bot@users.noreply.github.com"
6765
git config --global user.name "zksync-era-bot"
68-
git remote set-url origin 'https://${{ secrets.GITHUB_TOKEN }}@github.com/matter-labs/vm2.git'
66+
git remote set-url origin 'https://${{ secrets.RELEASE_TOKEN }}@github.com/matter-labs/vm2.git'
6967
git add ./Cargo.toml
7068
git commit -m "$EXPECTED_COMMIT_MESSAGE"
7169
git push

.github/workflows/release-please.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
id: release
3030
uses: googleapis/release-please-action@7987652d64b4581673a76e33ad5e98e3dd56832f # v4.1.3
3131
with:
32-
token: ${{ secrets.GITHUB_TOKEN }}
32+
token: ${{ secrets.RELEASE_TOKEN }}
3333
config-file: .github/release-please/config.json
3434
manifest-file: .github/release-please/manifest.json
3535

0 commit comments

Comments
 (0)