Merge branch 'main' into staging

This commit is contained in:
dal 2025-08-22 21:44:27 -06:00 committed by GitHub
commit c5d5e28cc5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 9 additions and 2 deletions

View File

@ -8,7 +8,7 @@ on:
jobs:
deploy:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
if: ${{ (github.event_name == 'workflow_dispatch') || (github.event.workflow_run.conclusion == 'success' && (github.event.workflow_run.head_branch == 'main' || github.event.workflow_run.head_branch == 'staging')) }}
runs-on: blacksmith-2vcpu-ubuntu-2404
environment: ${{ github.event.workflow_run.head_branch }}
@ -16,7 +16,13 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.event.workflow_run.head_branch }}
ref: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.environment || github.event.workflow_run.head_branch }}
- name: Get commit SHA
id: commit
run: |
echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
echo "sha_full=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
- name: Get commit SHA
id: commit
@ -80,6 +86,7 @@ jobs:
- name: Handle deployment failure
if: failure()
run: |
echo "## ❌ Deployment Failed!" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "- **Environment:** ${{ github.event.workflow_run.head_branch }}" >> $GITHUB_STEP_SUMMARY