Compare commits
2 Commits
issues/27-future
...
prod
| Author | SHA1 | Date | |
|---|---|---|---|
| c797ad7e2f | |||
| bcb4bd16d3 |
@@ -1,17 +1,8 @@
|
|||||||
name: adminpanel-ci-cd
|
name: adminpanel-ci-cd
|
||||||
|
|
||||||
|
# CI/CD: только push git-тега (ручное тегирование на ветке prod|test|stage).
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
|
||||||
inputs:
|
|
||||||
branch:
|
|
||||||
description: 'Ветка для прогона тестов'
|
|
||||||
required: true
|
|
||||||
default: test
|
|
||||||
type: choice
|
|
||||||
options:
|
|
||||||
- prod
|
|
||||||
- test
|
|
||||||
- stage
|
|
||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- 'adminpanel-v*'
|
- 'adminpanel-v*'
|
||||||
@@ -23,12 +14,9 @@ env:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
if: github.event_name == 'workflow_dispatch' || startsWith(github.ref, 'refs/tags/adminpanel-v')
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
|
||||||
ref: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.branch || github.ref }}
|
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: '24'
|
node-version: '24'
|
||||||
@@ -38,7 +26,6 @@ jobs:
|
|||||||
- run: npm run build
|
- run: npm run build
|
||||||
|
|
||||||
parse-tag:
|
parse-tag:
|
||||||
if: startsWith(github.ref, 'refs/tags/adminpanel-v')
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
outputs:
|
outputs:
|
||||||
full_tag: ${{ steps.meta.outputs.full_tag }}
|
full_tag: ${{ steps.meta.outputs.full_tag }}
|
||||||
@@ -55,7 +42,6 @@ jobs:
|
|||||||
|
|
||||||
build-and-push:
|
build-and-push:
|
||||||
needs: [test, parse-tag]
|
needs: [test, parse-tag]
|
||||||
if: startsWith(github.ref, 'refs/tags/adminpanel-v')
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
@@ -74,7 +60,6 @@ jobs:
|
|||||||
|
|
||||||
deploy-gitops:
|
deploy-gitops:
|
||||||
needs: [build-and-push, parse-tag]
|
needs: [build-and-push, parse-tag]
|
||||||
if: startsWith(github.ref, 'refs/tags/adminpanel-v')
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Bump image tag in sova-deploy
|
- name: Bump image tag in sova-deploy
|
||||||
|
|||||||
Reference in New Issue
Block a user