]> git.alsa-project.org Git - alsa-lib.git/commitdiff
github: add pr-validation and label-automation workflows
authorJaroslav Kysela <perex@perex.cz>
Wed, 27 May 2026 14:06:51 +0000 (16:06 +0200)
committerJaroslav Kysela <perex@perex.cz>
Wed, 27 May 2026 14:09:19 +0000 (16:09 +0200)
https://github.com/alsa-project/github-workflows

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
.github/workflows/label-automation.yml [new file with mode: 0644]
.github/workflows/pr-validation.yml [new file with mode: 0644]
.gitignore

diff --git a/.github/workflows/label-automation.yml b/.github/workflows/label-automation.yml
new file mode 100644 (file)
index 0000000..092e75c
--- /dev/null
@@ -0,0 +1,29 @@
+# Example workflow for using the label commenter
+# Place this file in your repository at: .github/workflows/label-automation.yml
+#
+# You also need to create .github/label-descriptions.yml in your repository
+# Example config: https://github.com/alsa-project/github-workflows/blob/main/config/label-descriptions.yml
+
+name: Label Automation
+
+on:
+  issues:
+    types: [labeled, unlabeled]
+  pull_request:
+    types: [labeled, unlabeled]
+  pull_request_target:
+    types: [labeled, unlabeled]
+
+jobs:
+  handle-label:
+    uses: alsa-project/github-workflows/.github/workflows/label-commenter.yml@main
+    permissions:
+      contents: read
+      pull-requests: write
+      issues: write
+    with:
+      # Path to your local config file OR URL to remote config (required)
+      config-path: 'https://raw.githubusercontent.com/alsa-project/github-workflows/main/config/label-descriptions.yml'
+      # Local file example: '.github/label-descriptions.yml'
+      # Remote URL example: 'https://raw.githubusercontent.com/alsa-project/github-workflows/main/config/label-descriptions.yml'
+    secrets: inherit
diff --git a/.github/workflows/pr-validation.yml b/.github/workflows/pr-validation.yml
new file mode 100644 (file)
index 0000000..79835cf
--- /dev/null
@@ -0,0 +1,35 @@
+# Example workflow for automatic Signed-off-by validation
+# Place this file in your repository at: .github/workflows/pr-validation.yml
+#
+# You also need to create .github/label-descriptions.yml in your repository
+# Example config: https://github.com/alsa-project/github-workflows/blob/main/config/label-descriptions.yml
+
+name: PR Validation
+
+on:
+  pull_request:
+    types: [opened, synchronize, reopened]
+  pull_request_target:
+    types: [opened, synchronize, reopened]
+  workflow_dispatch:
+    inputs:
+      pr_number:
+        description: 'Pull Request number to validate'
+        required: true
+        type: number
+
+jobs:
+  validate-commits:
+    uses: alsa-project/github-workflows/.github/workflows/sob-validator.yml@main
+    permissions:
+      contents: read
+      pull-requests: write
+      issues: write
+    with:
+      # Path to your local config file OR URL to remote config (required)
+      config-path: 'https://raw.githubusercontent.com/alsa-project/github-workflows/main/config/label-descriptions.yml'
+      # Local file example: '.github/label-descriptions.yml'
+      # Remote URL example: 'https://raw.githubusercontent.com/alsa-project/github-workflows/main/config/label-descriptions.yml'
+      sob-label: 'signed off by'
+      pr-number: ${{ github.event_name == 'workflow_dispatch' && format('{0}', inputs.pr_number) || '' }}
+    secrets: inherit
index 80d3f8b72bbc96da275ceb877e4de1822c075578..58ff80abec23782fb019346d69fb3817a82d4d94 100644 (file)
@@ -1,4 +1,3 @@
-.*
 !.travis.yml
 configure
 config.log