Skip to content

Commit

Permalink
add an action that comments when the doc check action is updated
Browse files Browse the repository at this point in the history
GitHub doesn't support symbolic links for actions. :(
Therefore, we need to duplicate the automatic-doc-checks action.

This action here adds a comment to PRs that change one of these
files (as a reminder to update both and keep them in sync).

Signed-off-by: Ruth Fuchss <ruth.fuchss@canonical.com>
  • Loading branch information
ru-fu committed Jun 13, 2024
1 parent b40e2cf commit f75ca7b
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/keep-action-in-sync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Keep action in sync

on:
pull_request:
paths:
- .github/workflows/automatic-doc-checks.yml
- sp-files/.github/workflows/automatic-doc-checks.yml

jobs:
comment:
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v6
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: 'Make sure to keep `.github/workflows/automatic-doc-checks.yml` and `sp-files/.github/workflows/automatic-doc-checks.yml` in sync!'
})

0 comments on commit f75ca7b

Please sign in to comment.