Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -4,9 +4,10 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches: [master, main]
|
branches: [master, main]
|
||||||
pull_request:
|
pull_request:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: eventhub-frontadmin-${{ github.ref }}
|
group: eventhub-frontadmin-ci-${{ github.ref }}
|
||||||
cancel-in-progress: false
|
cancel-in-progress: false
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|||||||
@@ -1,13 +1,14 @@
|
|||||||
name: Deploy IFT (admin)
|
name: Deploy IFT (admin)
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
workflow_run:
|
||||||
|
workflows: [CI]
|
||||||
|
types: [completed]
|
||||||
branches: [master, main]
|
branches: [master, main]
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
# Один runner (WSL): параллельные workflow ломают buildx/act.
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: eventhub-frontadmin-${{ github.ref }}
|
group: eventhub-frontadmin-deploy-ift
|
||||||
cancel-in-progress: false
|
cancel-in-progress: false
|
||||||
|
|
||||||
env:
|
env:
|
||||||
@@ -17,14 +18,26 @@ env:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
deploy-ift-admin:
|
deploy-ift-admin:
|
||||||
|
if: |
|
||||||
|
github.event_name == 'workflow_dispatch' ||
|
||||||
|
(github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success')
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 90
|
timeout-minutes: 90
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
ref: ${{ github.event_name == 'workflow_run' && github.event.workflow_run.head_sha || github.sha }}
|
||||||
|
|
||||||
- name: Compute image tag
|
- name: Compute image tag
|
||||||
id: meta
|
id: meta
|
||||||
run: echo "tag=sha-${GITHUB_SHA:0:12}" >> "$GITHUB_OUTPUT"
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
if [ "${{ github.event_name }}" = "workflow_run" ]; then
|
||||||
|
SHA="${{ github.event.workflow_run.head_sha }}"
|
||||||
|
else
|
||||||
|
SHA="${GITHUB_SHA}"
|
||||||
|
fi
|
||||||
|
echo "tag=sha-${SHA:0:12}" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
@@ -34,6 +47,20 @@ jobs:
|
|||||||
- run: npm ci
|
- run: npm ci
|
||||||
- run: npm run build
|
- run: npm run build
|
||||||
|
|
||||||
|
- name: Wait for Docker daemon
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
for i in $(seq 1 36); do
|
||||||
|
if docker info >/dev/null 2>&1; then
|
||||||
|
echo "Docker ready"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
echo "waiting for docker (${i}/36)..."
|
||||||
|
sleep 5
|
||||||
|
done
|
||||||
|
echo "Docker daemon not available"
|
||||||
|
exit 1
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user