32 lines
827 B
YAML
32 lines
827 B
YAML
name: Gitea Branch PR, SonarQube Analyze, and Merge Workflow
|
|
|
|
on:
|
|
push:
|
|
branches-ignore:
|
|
- main
|
|
|
|
jobs:
|
|
# Job 1: Check if PR exists and create one if the branch is new
|
|
check-and-create-pr:
|
|
name: Check and Create PR
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
pr_created: ${{ steps.cc-pr.outputs.pr_created }}
|
|
pr_number: ${{ steps.cc-pr.outputs.pr_index }}
|
|
steps:
|
|
- name: Checkout Code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: PR Check
|
|
id: cc-pr
|
|
uses: vicamo/gitea-list-pull-requests@v1.0.1
|
|
with:
|
|
repository: ${{ github.repository }}
|
|
token: ${{ secrets.BOT_GITEA_TOKEN }}
|
|
server_url: ${{ github.server_url }}
|
|
state: all
|
|
|
|
- name: PR list
|
|
run: |
|
|
echo "PRs: ${{ steps.cc-pr.outputs.json }}"
|