Add voting to gerrit-verify, add dependabot
Signed-off-by: Eric Ball <eball@linuxfoundation.org>
Change-Id: I965cf2896efe6f41e84587d5ddd8d77f9779fb11
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
new file mode 100644
index 0000000..db5207a
--- /dev/null
+++ b/.github/dependabot.yml
@@ -0,0 +1,15 @@
+---
+# SPDX-FileCopyrightText: 2026 The Linux Foundation
+# SPDX-License-Identifier: Apache-2.0
+
+# To get started with Dependabot version updates, you'll need to specify which
+# package ecosystems to update and where the package manifests are located.
+# Please see the documentation for all configuration options:
+# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
+
+version: 2
+updates:
+ - package-ecosystem: "github-actions"
+ directory: "/"
+ schedule:
+ interval: "weekly"
diff --git a/.github/workflows/gerrit-verify.yaml b/.github/workflows/gerrit-verify.yaml
index 601cfc7..4e43c27 100644
--- a/.github/workflows/gerrit-verify.yaml
+++ b/.github/workflows/gerrit-verify.yaml
@@ -45,6 +45,12 @@
description: "Gerrit refspec of change"
required: true
type: string
+ # Needed for voting
+ comment-only:
+ description: "Make this workflow advisory only, default false"
+ required: false
+ type: string
+ default: "false"
concurrency:
# yamllint disable-line rule:line-length
@@ -52,7 +58,26 @@
cancel-in-progress: true
jobs:
+ prepare:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Clear votes
+ # yamllint disable-line rule:line-length
+ uses: lfreleng-actions/gerrit-review-action@537251ec667665b386f70b330b05446e3fc29087 # v0.9
+ with:
+ host: ${{ vars.GERRIT_SERVER }}
+ username: ${{ vars.GERRIT_SSH_USER }}
+ key: ${{ secrets.GERRIT_SSH_PRIVKEY }}
+ known_hosts: ${{ vars.GERRIT_KNOWN_HOSTS }}
+ gerrit-change-number: ${{ inputs.GERRIT_CHANGE_NUMBER }}
+ gerrit-patchset-number: ${{ inputs.GERRIT_PATCHSET_NUMBER }}
+ vote-type: clear
+ comment-only: ${{ inputs.comment-only }}
+ - name: Allow replication
+ run: sleep 10s
+
actionlint:
+ needs: prepare
runs-on: ubuntu-latest
steps:
# yamllint disable-line rule:line-length
@@ -70,3 +95,24 @@
- name: Check workflow files
run: ${{ steps.get_actionlint.outputs.executable }} -color
shell: bash
+
+ vote:
+ if: ${{ always() }}
+ needs: [prepare, actionlint]
+ runs-on: ubuntu-latest
+ steps:
+ - name: Get conclusion
+ # yamllint disable-line rule:line-length
+ uses: im-open/workflow-conclusion@e4f7c4980600fbe0818173e30931d3550801b992 # v2.2.3
+ - name: Set vote
+ # yamllint disable-line rule:line-length
+ uses: lfreleng-actions/gerrit-review-action@537251ec667665b386f70b330b05446e3fc29087 # v0.9
+ with:
+ host: ${{ vars.GERRIT_SERVER }}
+ username: ${{ vars.GERRIT_SSH_USER }}
+ key: ${{ secrets.GERRIT_SSH_PRIVKEY }}
+ known_hosts: ${{ vars.GERRIT_KNOWN_HOSTS }}
+ gerrit-change-number: ${{ inputs.GERRIT_CHANGE_NUMBER }}
+ gerrit-patchset-number: ${{ inputs.GERRIT_PATCHSET_NUMBER }}
+ vote-type: ${{ env.WORKFLOW_CONCLUSION }}
+ comment-only: ${{ inputs.comment-only }}