-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathaction.yml
More file actions
56 lines (52 loc) · 1.64 KB
/
action.yml
File metadata and controls
56 lines (52 loc) · 1.64 KB
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: "queensac"
description: "Check GitHub repository links and optionally open PRs to fix them."
author: "reddevilmidzy"
branding:
icon: "link"
color: "purple"
inputs:
repo:
description: "GitHub repository URL to scan (defaults to the workflow repository)."
required: false
branch:
description: "Target branch to check and base branch for the pull request."
required: false
dry-run:
description: "Skip pull request creation and only report results."
default: "false"
required: false
github_app_id:
description: "GitHub App ID to use when creating pull requests."
required: false
github_app_private_key:
description: "GitHub App private key (PEM) to use when creating pull requests."
required: false
runs:
using: "composite"
steps:
- name: Install queensac
shell: bash
run: |
set -eo pipefail
rustup update stable
cargo install --path "${{ github.action_path }}" --force
echo "${HOME}/.cargo/bin" >> "${GITHUB_PATH}"
- name: Run queensac
shell: bash
env:
QUEENSAC_APP_ID: ${{ inputs.github_app_id }}
QUEENSAC_APP_PRIVATE_KEY: ${{ inputs.github_app_private_key }}
run: |
set -eo pipefail
repo_input='${{ inputs.repo }}'
if [ -z "${repo_input}" ]; then
repo_input="https://github.com/${{ github.repository }}"
fi
cmd=(queensac --repo "${repo_input}")
if [ -n "${{ inputs.branch }}" ]; then
cmd+=("--branch" "${{ inputs.branch }}")
fi
if [ "${{ inputs.dry-run }}" = "true" ]; then
cmd+=("--dry-run")
fi
"${cmd[@]}"