Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .github/workflows/contribution-policy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Contribution policy automation

on:
issues:
types: [opened, reopened, labeled, unlabeled, assigned, unassigned, closed]
issue_comment:
types: [created]
pull_request_target:
types: [opened, reopened, edited, synchronize, closed, labeled, unlabeled]
schedule:
- cron: '17 6 * * *'
workflow_dispatch:

permissions: {}

# The three-assignment limit is per repository. Preserve queued commands.
# queue: max is supported: https://docs.github.com/en/actions/how-tos/write-workflows/choose-when-workflows-run/control-workflow-concurrency#example-queueing-multiple-pending-runs
concurrency:
group: contribution-policy
queue: max
cancel-in-progress: false

jobs:
policy:
if: >-
github.repository_owner == 'kubescape' &&
vars.CONTRIBUTION_POLICY_START != '' &&
(github.event_name != 'issue_comment' || github.event.comment.user.type != 'Bot')
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
contents: read
issues: write
pull-requests: write
checks: write
steps:
# Before activation, verify this pinned action commit is on kubescape/workflows main.
# No checkout: contributor code is never executed by this privileged job.
- uses: kubescape/workflows/.github/actions/contribution-policy@b65263209ccb370f0cb508f776cde7850ebfb6ee
with:
start: ${{ vars.CONTRIBUTION_POLICY_START }}
Loading