-
Notifications
You must be signed in to change notification settings - Fork 32
45 lines (38 loc) · 1.47 KB
/
generate-meta-parent-policy-templates.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
name: Generate Meta Parent Policy Templates
on:
# Trigger this workflow on pushes to master
push:
branches:
- master
# Workflow dispatch trigger allows manually running workflow
workflow_dispatch:
branches:
- master
jobs:
meta-parent-policy-templates:
name: "Generate Meta Parent Policy Templates"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Speed up checkout by not fetching history
- uses: ruby/setup-ruby@v1
- name: Generate Meta Parent Policy Template
working-directory: tools/meta_parent_policy_compiler
run: |
ruby meta_parent_policy_compiler.rb
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v4
with:
commit-message: "Update Meta Parent Policy Templates"
title: "Update Meta Parent Policy Templates"
body: "Update Meta Parent Policy Templates from GitHub Actions Workflow [${{ github.workflow }}](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})"
branch: "task/update-meta-parent-policy-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 }}"