Skip to content

Commit

Permalink
chore(release-please): trigger lint actions on PR updates
Browse files Browse the repository at this point in the history
This removes the need for a manual `/lint` comment. We execute this with the Personal Access Token so the slash-command-dispatch action will run.

Signed-off-by: Dirk de Visser <github@dirkdevisser.nl>
  • Loading branch information
dirkdev98 committed May 24, 2024
1 parent 004392f commit 865cacd
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,28 @@ jobs:
paths_released: ${{ steps.rp_step.outputs.paths_released }}
releases_created: ${{ steps.rp_step.outputs.releases_created }}
steps:
- uses: googleapis/release-please-action@v4
- name: "Release please"
uses: googleapis/release-please-action@v4
id: rp_step
with:
# Expires ~December 2024
token: ${{ secrets.REPO_ADMIN_TOKEN }}
config-file: release-please-config.json
manifest-file: release-please-manifest.json

- name: "Trigger lint fixes"
if: ${{ steps.rp_step.outputs.prs_created && steps.rp_step.outputs.pr != null }}
uses: actions/github-scripts@v7
with:
github-token: ${{ secrets.REPO_ADMIN_TOKEN }}
script: |
github.rest.issues.createComment({
issue_number: ${{ steps.rp_step.outputs.pr.number }}
owner: context.repo.owner,
repo: context.repo.repo,
body: "/lint",
});
publish:
needs:
- release
Expand Down

0 comments on commit 865cacd

Please sign in to comment.