mirror of https://github.com/buster-so/buster.git
Merge branch 'main' into staging
This commit is contained in:
commit
c5d5e28cc5
|
@ -8,7 +8,7 @@ on:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
deploy:
|
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
|
runs-on: blacksmith-2vcpu-ubuntu-2404
|
||||||
environment: ${{ github.event.workflow_run.head_branch }}
|
environment: ${{ github.event.workflow_run.head_branch }}
|
||||||
|
|
||||||
|
@ -16,7 +16,13 @@ jobs:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
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
|
- name: Get commit SHA
|
||||||
id: commit
|
id: commit
|
||||||
|
@ -80,6 +86,7 @@ jobs:
|
||||||
- name: Handle deployment failure
|
- name: Handle deployment failure
|
||||||
if: failure()
|
if: failure()
|
||||||
run: |
|
run: |
|
||||||
|
|
||||||
echo "## ❌ Deployment Failed!" >> $GITHUB_STEP_SUMMARY
|
echo "## ❌ Deployment Failed!" >> $GITHUB_STEP_SUMMARY
|
||||||
echo "" >> $GITHUB_STEP_SUMMARY
|
echo "" >> $GITHUB_STEP_SUMMARY
|
||||||
echo "- **Environment:** ${{ github.event.workflow_run.head_branch }}" >> $GITHUB_STEP_SUMMARY
|
echo "- **Environment:** ${{ github.event.workflow_run.head_branch }}" >> $GITHUB_STEP_SUMMARY
|
||||||
|
|
Loading…
Reference in New Issue