-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add validate-policy-bot-action
- Loading branch information
Showing
4 changed files
with
66 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Validate Policy Bot config | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- .policy.yml | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- .policy.yml | ||
|
||
jobs: | ||
validate-policy-bot-config: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 | ||
|
||
- name: Validate Policy Bot config | ||
uses: ./actions/validate-policy-bot-config |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# validate-policy-bot-config | ||
|
||
Generate an SPDX SBOM Report and attached to Release Artifcats on Release Publish | ||
|
||
Example workflow: | ||
|
||
```yaml | ||
name: validate-policy-bot | ||
on: | ||
pull_request: | ||
paths: | ||
- ".policy.yml" | ||
push: | ||
paths: | ||
- ".policy.yml | ||
jobs: | ||
validate-policy-bot: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Validate Policy Bot configuration | ||
uses: grafana/shared-workflows/actions/validate-policy-bot-config@main | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Validate Policy Bot Config | ||
description: Validates the Policy Bot configuration file. | ||
|
||
inputs: | ||
validation_endpoint: | ||
description: | | ||
Validation API endpoint. | ||
default: https://github-policy-bot.grafana-ops.net/api/validate | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Validate Policy Bot config | ||
shell: bash | ||
run: | | ||
curl \ | ||
--silent \ | ||
--fail-with-body \ | ||
--request PUT \ | ||
--upload-file .policy.yml \ | ||
${{ inputs.validation_endpoint }} |