Skip to content

Generate Policy Master Permissions Missing Templates JSON/YAML #174

Generate Policy Master Permissions Missing Templates JSON/YAML

Generate Policy Master Permissions Missing Templates JSON/YAML #174

name: Generate Policy Master Permissions Missing Templates JSON/YAML
on:
workflow_run:
workflows: ["Test Policies"]
branches: [master]
types:
- completed
# Workflow dispatch trigger allows manually running workflow
workflow_dispatch:
branches:
- master
jobs:
master-policy-permissions-missing-templates:
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_missing_permission_list.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 Missing Templates List"
body: "Update Policy Master Permissions Missing Templates List from GitHub Actions Workflow [${{ github.workflow }}](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})"
branch: "task/update-policy-master-permissions-missing-templates"
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 }}"