-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction.yml
More file actions
50 lines (43 loc) · 1.31 KB
/
Copy pathaction.yml
File metadata and controls
50 lines (43 loc) · 1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# SPDX-FileCopyrightText: 2026 LibreCode coop and contributors
# SPDX-License-Identifier: AGPL-3.0-or-later
name: Reconcile repository rulesets
description: Plan or apply repository rulesets with the shared LibreCode governance engine
inputs:
token:
description: Repository-scoped GitHub token with administration permission
required: true
repository:
description: Repository in OWNER/REPO form
required: true
config:
description: Path to caller governance config
required: true
apply:
description: Apply changes instead of dry-running
required: false
default: 'false'
runs:
using: composite
steps:
- name: Set up Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 24
package-manager-cache: false
- name: Reconcile rulesets
shell: bash
env:
GITHUB_TOKEN: ${{ inputs.token }}
TARGET_REPOSITORY: ${{ inputs.repository }}
CONFIG_PATH: ${{ inputs.config }}
APPLY: ${{ inputs.apply }}
working-directory: ${{ github.action_path }}
run: |
args=(
--repo "$TARGET_REPOSITORY"
--config "$CONFIG_PATH"
)
if [[ "$APPLY" == "true" ]]; then
args+=(--apply)
fi
node src/cli.ts "${args[@]}"