-
Notifications
You must be signed in to change notification settings - Fork 32
50 lines (41 loc) · 1.61 KB
/
generate-policy-master-permissions-json.yaml
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
name: Generate Policy Master Permissions JSON
on:
# Trigger this workflow on pushes to master
push:
branches:
- master
- POL-918-create-master-policy-perm-list
# Workflow dispatch trigger allows manually running workflow
workflow_dispatch:
branches:
- master
- POL-918-create-master-policy-perm-list
jobs:
master-policy-permissions:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0 # Speed up checkout by not fetching history
- name: Set up Ruby
uses: ruby/setup-ruby@v1
- name: Run Generate Policy Master Permissions Script
id: policy_permissions_json
run: |
ruby tools/policy_master_permission_generation/generate_policy_master_permissions.rb
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v4
with:
commit-message: "Update Policy Master Permissions List"
title: "Update Policy Master Permissions List"
body: "Update Policy Master Permissions List from GitHub Actions Workflow [${{ github.workflow }}](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})"
branch: "task/update-policy-master-permissions"
delete-branch: true
labels: "automation"
- name: Check outputs
if: ${{ steps.cpr.outputs.pull-request-number }}
run: |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"