fix(ci): skip build and deploy jobs when target is skip (chore commits)
This commit is contained in:
@@ -50,6 +50,7 @@ jobs:
|
|||||||
TAG="${{ github.ref_name }}"
|
TAG="${{ github.ref_name }}"
|
||||||
SHORT_SHA="${{ github.sha }}"
|
SHORT_SHA="${{ github.sha }}"
|
||||||
SHORT_SHA="${SHORT_SHA:0:9}"
|
SHORT_SHA="${SHORT_SHA:0:9}"
|
||||||
|
IMAGE_TAG="sha-${SHORT_SHA}"
|
||||||
COMMIT_MSG=$(git log -1 --pretty=%s || echo "No commit message available")
|
COMMIT_MSG=$(git log -1 --pretty=%s || echo "No commit message available")
|
||||||
|
|
||||||
if [[ "${{ github.ref_type }}" == "branch" && "$TAG" == "main" ]]; then
|
if [[ "${{ github.ref_type }}" == "branch" && "$TAG" == "main" ]]; then
|
||||||
@@ -168,6 +169,7 @@ jobs:
|
|||||||
build:
|
build:
|
||||||
name: 🏗️ Build & Push
|
name: 🏗️ Build & Push
|
||||||
needs: prepare
|
needs: prepare
|
||||||
|
if: needs.prepare.outputs.target != 'skip'
|
||||||
runs-on: docker
|
runs-on: docker
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
@@ -216,6 +218,7 @@ jobs:
|
|||||||
deploy:
|
deploy:
|
||||||
name: 🚀 Deploy
|
name: 🚀 Deploy
|
||||||
needs: [prepare, build, qa]
|
needs: [prepare, build, qa]
|
||||||
|
if: needs.prepare.outputs.target != 'skip'
|
||||||
runs-on: docker
|
runs-on: docker
|
||||||
env:
|
env:
|
||||||
TARGET: ${{ needs.prepare.outputs.target }}
|
TARGET: ${{ needs.prepare.outputs.target }}
|
||||||
|
|||||||
Reference in New Issue
Block a user