Files
rinoa-docker/.gitea/workflows/deployment.yml
T
2024-12-24 15:00:04 -05:00

37 lines
999 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 list
uses: magebitcom/list-pr-action@v1.0.0
id: list-prs
with:
base: 'main'
github-token: ${{ secrets.BOT_GITEA_TOKEN }}
state: open
hours_old: 0
- name: List PRs
run: |
echo "PR count: ${{ steps.list-prs.outputs.count }}"
echo "PR List: ${{ steps.list-prs.outputs.pull_requests_json }}"
- name: Create PR
if: steps.list-prs.outputs.pr-count == 0
uses: arifer612/Gitea-PR-action@v1.2.0
with:
url: ${{ gitea.server_url }}
token: ${{ secrets.BOT_GITEA_TOKEN }}
assignee: ${{ gitea.actor }}