Refactoring PR check/creation in manual PR workflow.
Gitea Branch PR, Cloudflare DNS, README generation, & Docker Deployment / Docker Compose Deployment (push) Has been skipped
Gitea Branch PR, Cloudflare DNS, README generation, & Docker Deployment / Check and Create PR (push) Successful in 12s
Gitea Branch PR, Cloudflare DNS, README generation, & Docker Deployment / Docker Compose Dry Run (push) Has been cancelled
Gitea Branch PR, Cloudflare DNS, README generation, & Docker Deployment / Cloudflare DNS Setup (push) Has been cancelled
Gitea Branch PR, Cloudflare DNS, README generation, & Docker Deployment / Update README & Generate List of Modified Services (push) Has been cancelled
Gitea Branch PR, Cloudflare DNS, README generation, & Docker Deployment / PR Merge (push) Has been cancelled
Gitea Branch PR, Cloudflare DNS, README generation, & Docker Deployment / Generate list of added/modified/deleted services (push) Has been cancelled
Gitea Branch PR, Cloudflare DNS, README generation, & Docker Deployment / Docker Compose Deployment (push) Has been skipped
Gitea Branch PR, Cloudflare DNS, README generation, & Docker Deployment / Check and Create PR (push) Successful in 12s
Gitea Branch PR, Cloudflare DNS, README generation, & Docker Deployment / Docker Compose Dry Run (push) Has been cancelled
Gitea Branch PR, Cloudflare DNS, README generation, & Docker Deployment / Cloudflare DNS Setup (push) Has been cancelled
Gitea Branch PR, Cloudflare DNS, README generation, & Docker Deployment / Update README & Generate List of Modified Services (push) Has been cancelled
Gitea Branch PR, Cloudflare DNS, README generation, & Docker Deployment / PR Merge (push) Has been cancelled
Gitea Branch PR, Cloudflare DNS, README generation, & Docker Deployment / Generate list of added/modified/deleted services (push) Has been cancelled
This commit is contained in:
@@ -24,13 +24,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
fetch-depth: 1
|
fetch-depth: 1
|
||||||
|
|
||||||
- name: Install tea
|
|
||||||
uses: supplypike/setup-bin@8e3f88b4f143d9b5c3497f0fc12d45c83c123787 # v4.0.1
|
|
||||||
with:
|
|
||||||
uri: https://gitea.com/gitea/tea/releases/download/v${{ env.TEA_VERSION }}/tea-${{ env.TEA_VERSION }}-linux-amd64
|
|
||||||
name: tea
|
|
||||||
version: ${{ env.TEA_VERSION }}
|
|
||||||
|
|
||||||
- name: Gotify Notification
|
- name: Gotify Notification
|
||||||
uses: eikendev/gotify-action@master
|
uses: eikendev/gotify-action@master
|
||||||
with:
|
with:
|
||||||
@@ -39,43 +32,14 @@ jobs:
|
|||||||
notification_title: "GITEA: PR Check @ Rinoa"
|
notification_title: "GITEA: PR Check @ Rinoa"
|
||||||
notification_message: "Checking for existing PR... 🔍"
|
notification_message: "Checking for existing PR... 🔍"
|
||||||
|
|
||||||
- name: Check if open PR exists
|
- name: PR Check/Creation
|
||||||
id: check-opened-pr-step
|
uses: https://git.trez.wtf/Trez/gitea-auto-pr@main
|
||||||
continue-on-error: true
|
with:
|
||||||
run: |
|
url: ${{ secrets.TREZ_GITEA_URL }}
|
||||||
tea login add \
|
token: ${{ secrets.BOT_GITEA_TOKEN }}
|
||||||
--name gitea-rinoa \
|
tea-version: ${{ env.TEA_VERSION }}
|
||||||
--url "${{ secrets.TREZ_GITEA_URL }}" \
|
pr-label: rinoa-docker,manual
|
||||||
--user gitea-sonarqube-bot \
|
assignee: ${{ github.actor }}
|
||||||
--password "${{ secrets.BOT_GITEA_PASSWORD }}" \
|
|
||||||
--token ${{ secrets.BOT_GITEA_TOKEN }}
|
|
||||||
|
|
||||||
pr_exists=$(tea pr list \
|
|
||||||
--repo ${{ github.repository }} \
|
|
||||||
--state open \
|
|
||||||
--fields index,title,head \
|
|
||||||
| egrep '\[DOCKER\].*${{ github.ref_name }}' | tail -1 | wc -l)
|
|
||||||
|
|
||||||
echo "exists=$pr_exists" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- name: Create PR
|
|
||||||
if: ${{ steps.check-opened-pr-step.outputs.exists == '0' }}
|
|
||||||
run: |
|
|
||||||
tea login default gitea-rinoa
|
|
||||||
|
|
||||||
pr_index_old=$(tea pr ls \
|
|
||||||
--repo ${{ github.repository }} \
|
|
||||||
--state all --fields index,title,head \
|
|
||||||
--output csv | sed -e 's|"||g' | \
|
|
||||||
egrep '^[0-9]' | head -1 | awk -F"," '{print $1}')
|
|
||||||
|
|
||||||
pr_index_new=$(expr ${pr_index_old} + 1)
|
|
||||||
|
|
||||||
tea pr c -r ${{ github.repository }} \
|
|
||||||
-t "[DOCKER] Automated PR for ${{ github.ref_name }} - #${pr_index_new}" \
|
|
||||||
-d "Automatically created PR for branch: ${{ github.ref_name }}" \
|
|
||||||
-a ${{ github.actor }} \
|
|
||||||
-L "Docker Compose"
|
|
||||||
|
|
||||||
- name: Gotify Notification
|
- name: Gotify Notification
|
||||||
uses: eikendev/gotify-action@master
|
uses: eikendev/gotify-action@master
|
||||||
@@ -83,7 +47,7 @@ jobs:
|
|||||||
gotify_api_base: "${{ secrets.RUNNER_GOTIFY_URL }}"
|
gotify_api_base: "${{ secrets.RUNNER_GOTIFY_URL }}"
|
||||||
gotify_app_token: "${{ secrets.RUNNER_GOTIFY_TOKEN }}"
|
gotify_app_token: "${{ secrets.RUNNER_GOTIFY_TOKEN }}"
|
||||||
notification_title: "GITEA: PR Check @ Rinoa"
|
notification_title: "GITEA: PR Check @ Rinoa"
|
||||||
notification_message: "PR Created 🎟️"
|
notification_message: "PR Check done 🎟️"
|
||||||
|
|
||||||
generate-service-list:
|
generate-service-list:
|
||||||
name: Generate list of added/modified/deleted services
|
name: Generate list of added/modified/deleted services
|
||||||
|
|||||||
Reference in New Issue
Block a user