29 lines
786 B
YAML
29 lines
786 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
|
|
steps:
|
|
- name: Checkout Code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: PR Check
|
|
id: pr-check
|
|
uses: vicamo/gitea-list-pull-requests@v1.0.1
|
|
with:
|
|
repository: ${{ gitea.repository }}
|
|
token: ${{ secrets.BOT_GITEA_TOKEN }}
|
|
state: all
|
|
|
|
- name: PR list
|
|
run: |
|
|
echo "PRs: ${{ steps.pr-check.outputs.json }}"
|
|
echo -e "${{ github.repository }}\n${{ github.server_url}}\n\n${{ gitea.repository }}\n${{ gitea.server_url }}"
|