mirror of https://github.com/buster-so/buster.git
commit
6496e426cd
|
@ -8,7 +8,7 @@ on:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
deploy:
|
deploy:
|
||||||
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')) }}
|
if: ${{ 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,12 +16,12 @@ jobs:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
ref: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.environment || github.event.workflow_run.head_branch }}
|
ref: ${{ github.event.workflow_run.head_branch }}
|
||||||
|
|
||||||
- name: Get commit SHA
|
- name: Get commit SHA
|
||||||
id: commit
|
id: commit
|
||||||
run: |
|
run: |
|
||||||
echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
|
echo "sha_short=$(git rev-parse --short=7 HEAD)" >> $GITHUB_OUTPUT
|
||||||
echo "sha_full=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
|
echo "sha_full=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Setup porter
|
- name: Setup porter
|
||||||
|
|
|
@ -8,6 +8,7 @@ on:
|
||||||
- 'packages/**'
|
- 'packages/**'
|
||||||
- 'pnpm-lock.yaml'
|
- 'pnpm-lock.yaml'
|
||||||
- '.github/workflows/docker-build-server.yml'
|
- '.github/workflows/docker-build-server.yml'
|
||||||
|
- '.github/workflows/deploy.yml'
|
||||||
|
|
||||||
# Only one build per branch at a time, queue others
|
# Only one build per branch at a time, queue others
|
||||||
concurrency:
|
concurrency:
|
||||||
|
@ -116,7 +117,7 @@ jobs:
|
||||||
- name: Extract metadata and determine tags
|
- name: Extract metadata and determine tags
|
||||||
id: meta
|
id: meta
|
||||||
run: |
|
run: |
|
||||||
SHA_SHORT=$(git rev-parse --short HEAD)
|
SHA_SHORT=$(git rev-parse --short=7 HEAD)
|
||||||
echo "sha_short=${SHA_SHORT}" >> $GITHUB_OUTPUT
|
echo "sha_short=${SHA_SHORT}" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
if [[ "${{ github.ref_name }}" == "main" ]]; then
|
if [[ "${{ github.ref_name }}" == "main" ]]; then
|
||||||
|
|
Loading…
Reference in New Issue