-
Notifications
You must be signed in to change notification settings - Fork 5
52 lines (50 loc) · 1.95 KB
/
update-profiles.yml
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
51
52
name: Update upstream content
on:
workflow_dispatch:
inputs:
ref:
description: 'Reference to sync from'
required: false
default: 'main'
jobs:
update:
name: Run update
runs-on: ubuntu-latest
steps:
- name: Generate app token
uses: tibdex/[email protected]
id: get_installation_token
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.PRIVATE_KEY }}
permissions: >-
{"contents": "write", "pull_requests": "write"}
- name: Clone
uses: actions/checkout@v4
with:
token: ${{ steps.get_installation_token.outputs.token }}
- name: Update from upstream repo
id: sync_upstreams
uses: RedHatProductSecurity/trestle-bot/actions/sync-upstreams@main
with:
branch: "sync-upstream-${{ github.run_id }}"
target_branch: "main"
commit_message: "Updates content from oscal-profiles repository [skip ci]"
pull_request_title: "Updates content from oscal-profiles repository"
commit_user_name: "trestle-bot[bot]"
commit_user_email: "136850459+trestle-bot[bot]@users.noreply.github.com"
github_token: ${{ steps.get_installation_token.outputs.token }}
sources: |
https://github.com/RedHatProductSecurity/oscal-profiles@${{ github.event.inputs.ref }}
- name: Regenerate component definitions
if: ${{ steps.sync_upstreams.outputs.commit }}
uses: RedHatProductSecurity/trestle-bot/actions/autosync@main
with:
markdown_path: "markdown/components"
oscal_model: "compdef"
file_pattern: "markdown/*"
branch: "sync-upstream-${{ github.run_id }}"
skip_assemble: true
commit_message: "Generate markdown changes [skip ci]"
commit_user_name: "trestle-bot[bot]"
commit_user_email: "136850459+trestle-bot[bot]@users.noreply.github.com"