-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
56 lines (51 loc) · 1.61 KB
/
action.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
53
54
55
56
name: "OpenSauced Pizza Action"
description: "GitHub Action to run OpenSauced's Pizza CLI's various commands"
branding:
icon: "package"
color: "orange"
inputs:
cli-version:
description: "OpenSauced Pizza CLI version to use"
default: "latest"
required: false
pizza-args:
description: "OpenSauced Pizza CLI command to run"
default: "generate codeowners ./ --tty-disable"
required: false
commit-and-pr:
description: "Commit and push changes"
default: "false"
required: false
pr-title:
description: "Custom pull request title"
default: "chore (automated): OpenSauced updates"
required: false
runs:
using: "composite"
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Run pizza CLI command
run: npx --yes pizza@${{ inputs.cli-version }} ${{ inputs.pizza-args }}
shell: bash
working-directory: ${{ github.workspace }}
- name: Make script executable
run: chmod +x ${{ github.action_path }}/scripts/create-pr.sh
shell: bash
- name: Setup git config
run: |
git config user.name 'open-sauced[bot]'
git config user.email '63161813+open-sauced[bot]@users.noreply.github.com'
shell: bash
working-directory: ${{ github.workspace }}
- name: Create a PR with pizza CLI changes
env:
GH_TOKEN: ${{ github.token }}
if: ${{ inputs.commit-and-pr == 'true' }}
run: |
export CUSTOM_PR_TITLE="${{ inputs.pr-title }}"
${{ github.action_path }}/scripts/create-pr.sh
shell: bash
working-directory: ${{ github.workspace }}