Skip to content

Commit

Permalink
ci: check file name in the "antora guidelines" workflow (#791)
Browse files Browse the repository at this point in the history
* based on feat/check_file_name branch from action repository

### Notes

Validate bonitasoft/actions#138 and
bonitasoft/actions#140
Cover #589
  • Loading branch information
benjaminParisel authored Oct 23, 2024
1 parent a057db1 commit c9a3f79
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ name: Check Antora content guidelines in Pull Request

on:
workflow_call: # this allows the workflow to be reused
inputs:
# Available steps: https://github.com/bonitasoft/actions/blob/main/packages/doc-contribs/pr-antora-content-guidelines-checker/README.md#using-this-action
steps-to-skip:
type: string
description: 'Comma-separated list of steps to skip, by default all steps are executed.'
default: ''
required: false

jobs:
checks:
Expand All @@ -20,3 +27,4 @@ jobs:
files-to-check: 'adoc'
# WARN: Be aware that spaces after/before the coma are not trimmed by the action. This means that the spaces are part of the pattern.
forbidden-pattern-to-check: 'https://documentation.bonitasoft.com,link:https,link:http,link:,xref:https,xref:http,xref:_,xref:#,Bonita BPM,https://api-documentation.bonitasoft.com'
steps-to-skip: ${{ inputs.steps-to-skip }}
2 changes: 1 addition & 1 deletion .github/workflows/pr-antora-checker-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ jobs:
check_antora_content_guidelines:
permissions:
pull-requests: write # "pr-antora-content-guidelines-checker" write PR comments when the PR doesn't match the "Guidelines"
uses: bonitasoft/bonita-documentation-site/.github/workflows/_reusable_pr-antora-content-guidelines-checker.yml@master
uses: ./.github/workflows/_reusable_pr-antora-content-guidelines-checker.yml
26 changes: 26 additions & 0 deletions .github/workflows/pr-comment-list-changes-on-test-data.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Comments PR with changes list on Test Data

on:
# use pull_request event to test update done of the reusable workflow (update the branch of the reusable workflow as well in this case)
pull_request_target:
paths:
- '.github/workflows/_reusable_pr-comment-list-changes.yml'
- '.github/workflows/pr-comment-list-changes.yml'
- 'test/documentation-content/**/*'

jobs:
test:
runs-on: ubuntu-22.04
# It's a duplicate of _reusable_pr-comment-list-changes to allow us to validate updated in test data
permissions:
pull-requests: write # write PR comments
steps:
- uses: bonitasoft/actions/packages/surge-preview-tools@v3
id: surge-preview-tools
with:
surge-token: ${{ secrets.SURGE_TOKEN_DOC }}
- name: Comments PR with links
uses: bonitasoft/actions/packages/doc-contribs/pr-comments-with-links@v3
with:
site-url: ${{ steps.surge-preview-tools.outputs.preview-url }}
component-name: ${{ inputs.component-name }}
14 changes: 0 additions & 14 deletions .github/workflows/pr-comment-list-changes.yml

This file was deleted.

0 comments on commit c9a3f79

Please sign in to comment.