-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (47 loc) · 1.49 KB
/
update-security-policy.yml
File metadata and controls
48 lines (47 loc) · 1.49 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
name: 📄 Update Security Policy
on:
workflow_dispatch:
inputs:
dry-run:
description: "Dry run: Run the workflow without making any changes"
required: false
default: false
type: boolean
schedule:
- cron: '0 23,11 * * *'
jobs:
get-refs:
runs-on: ubuntu-latest
outputs:
refs: ${{ steps.get-refs.outputs.refs }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get refs
id: get-refs
shell: pwsh
run: |
$refs = git branch -r --list 'origin/dev/v*' | ForEach-Object { $_.Trim() -replace 'origin/', '' } | Sort-Object -Unique | ConvertTo-Json -Compress
echo "refs=$refs" >> $env:GITHUB_OUTPUT
update:
runs-on: ubuntu-latest
needs: get-refs
env:
DRY_RUN: ${{ github.event.inputs.dry-run }}
PROJECT_NAME: Umbraco.Community.BackOfficeOrganiser
SECURITY_POLICY_FILEPATH: ./SECURITY.md
strategy:
max-parallel: 1
matrix:
ref: ${{fromJson(needs.get-refs.outputs.refs) }}
steps:
- name: Update Security Policy
uses: jcdcdev/jcdcdev.Umbraco.GitHub.PackageSecurity@main
with:
dry-run: ${{ env.DRY_RUN }}
project-name: ${{ env.PROJECT_NAME }}
security-policy-filepath: ${{ env.SECURITY_POLICY_FILEPATH }}
security-policy-api-key: ${{ secrets.SECURITY_POLICY_API_KEY }}
branch: ${{ matrix.ref }}