Breaking out merge and trigger into separate jobs (testing trigger).
This commit is contained in:
@@ -159,14 +159,13 @@ jobs:
|
|||||||
message: "chore: Update README"
|
message: "chore: Update README"
|
||||||
add: "README.md"
|
add: "README.md"
|
||||||
|
|
||||||
trigger-and-merge:
|
manual-trigger-deploy:
|
||||||
name: Trigger Deployment
|
name: Manual Trigger
|
||||||
needs: [generate-readme, docker-compose-test, regenerate-readme]
|
needs: [docker-compose-test, cloudflare-dns-setup, regenerate-readme]
|
||||||
|
outputs:
|
||||||
|
CONTINUE_JOBS: ${{ steps.manual-trigger.outputs.CONTINUE_JOBS }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Gotify Notification
|
- name: Gotify Notification
|
||||||
uses: eikendev/gotify-action@master
|
uses: eikendev/gotify-action@master
|
||||||
with:
|
with:
|
||||||
@@ -175,42 +174,43 @@ jobs:
|
|||||||
notification_title: 'Ready to Deploy'
|
notification_title: 'Ready to Deploy'
|
||||||
notification_message: 'Ready to deploy: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/jobs/${{ github.job }}'
|
notification_message: 'Ready to deploy: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/jobs/${{ github.job }}'
|
||||||
|
|
||||||
- name: manual-trigger
|
- name: Manual Trigger
|
||||||
|
uses: benhamiltonpro/manual-trigger@v1.0.2
|
||||||
id: manual-trigger
|
id: manual-trigger
|
||||||
uses: trstringer/manual-approval@v1.9.1
|
|
||||||
with:
|
with:
|
||||||
secret: ${{ secrets.BOT_GITEA_TOKEN }}
|
RUN_NAME: "pr-merge"
|
||||||
approvers: Trez.One
|
|
||||||
minimum-approvals: 1
|
|
||||||
issue-title: "Deploying ${{ github.ref_name }} (PR #{{ steps.pr_merge.outputs.pr_index }})"
|
|
||||||
issue-body: "Testing for now"
|
|
||||||
exclude-workflow-initiator-as-approver: false
|
|
||||||
additional-approved-words: ''
|
|
||||||
additional-denied-words: ''
|
|
||||||
|
|
||||||
# - name: PR Merge
|
pr-merge:
|
||||||
# id: pr_merge
|
name: Trigger Deployment
|
||||||
# run: |
|
if: ${{ needs.manual-trigger-deploy.outputs.CONTINUE_JOBS == 'true' }}
|
||||||
# tea login add --name gitea-rinoa --url ${{ secrets.RINOA_GITEA_URL }} --user gitea-sonarqube-bot --password "${{ secrets.BOT_GITEA_PASSWORD }}" --token ${{ secrets.BOT_GITEA_TOKEN }}
|
runs-on: ubuntu-latest
|
||||||
# tea login default gitea-rinoa
|
steps:
|
||||||
# pr_index=$(tea pr ls --repo ${{ github.repository }} --state open --fields index,title,head,state --output csv | egrep ${{ gitea.ref_name }} | awk -F, '{print $1}' | sed -e 's|"||g')
|
- name: Checkout
|
||||||
# tea pr m --repo ${{ github.repository }} --title "Auto Merge of PR #${pr_index} - ${{ gitea.ref_name }}" --message "Merged by ${{ gitea.actor }}" --output table ${pr_index}
|
uses: actions/checkout@v4
|
||||||
# echo "pr_index=${pr_index}" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
# - name: Wait for PR to be merged
|
# - name: PR Merge
|
||||||
# run: |
|
# id: pr_merge
|
||||||
# while true; do
|
# run: |
|
||||||
# pr_state=$(tea pr ls --repo ${{ github.repository }} --state merged --fields index,title,head,state --output csv | egrep ${{ github.ref_name }} | awk -F, '{print $4}' | sed -e 's|"||g')
|
# tea login add --name gitea-rinoa --url ${{ secrets.RINOA_GITEA_URL }} --user gitea-sonarqube-bot --password "${{ secrets.BOT_GITEA_PASSWORD }}" --token ${{ secrets.BOT_GITEA_TOKEN }}
|
||||||
# if [ "${pr_state}" == "merged" ]; then
|
# tea login default gitea-rinoa
|
||||||
# break
|
# pr_index=$(tea pr ls --repo ${{ github.repository }} --state open --fields index,title,head,state --output csv | egrep ${{ gitea.ref_name }} | awk -F, '{print $1}' | sed -e 's|"||g')
|
||||||
|
# tea pr m --repo ${{ github.repository }} --title "Auto Merge of PR #${pr_index} - ${{ gitea.ref_name }}" --message "Merged by ${{ gitea.actor }}" --output table ${pr_index}
|
||||||
|
# echo "pr_index=${pr_index}" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
# - name: Wait for PR to be merged
|
||||||
|
# run: |
|
||||||
|
# while true; do
|
||||||
|
# pr_state=$(tea pr ls --repo ${{ github.repository }} --state merged --fields index,title,head,state --output csv | egrep ${{ github.ref_name }} | awk -F, '{print $4}' | sed -e 's|"||g')
|
||||||
|
# if [ "${pr_state}" == "merged" ]; then
|
||||||
|
# break
|
||||||
|
|
||||||
# docker-compose-deploy:
|
# docker-compose-deploy:
|
||||||
# name: Deploy via Docker Compose
|
# name: Deploy via Docker Compose
|
||||||
# runs-on: ubuntu-latest
|
# runs-on: ubuntu-latest
|
||||||
# needs: [merge-and-trigger]
|
# needs: [pr-merge]
|
||||||
# env:
|
# env:
|
||||||
# VAULT_ADDR: ${{ secrets.RINOA_VAULT_ADDR }}
|
# VAULT_ADDR: ${{ secrets.RINOA_VAULT_ADDR }}
|
||||||
# VAULT_TOKEN: ${{ secrets.RINOA_VAULT_TOKEN }}
|
# VAULT_TOKEN: ${{ secrets.VAULT_GITEA_TOKEN }}
|
||||||
# DOCKER_HOST: tcp://dockerproxy:2375
|
# DOCKER_HOST: tcp://dockerproxy:2375
|
||||||
# environment: approval-environment
|
# environment: approval-environment
|
||||||
# steps:
|
# steps:
|
||||||
|
|||||||
Reference in New Issue
Block a user