fix: ci
This commit is contained in:
@@ -3,11 +3,7 @@ name: Build and Push Docker Image only on Conventional Commits
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
types: [closed]
|
||||
branches:
|
||||
- main
|
||||
- '**'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -51,13 +47,23 @@ jobs:
|
||||
if: ${{ steps.validate.outputs.valid == 'true' }}
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Determine Docker tag
|
||||
id: docker_tag
|
||||
if: ${{ steps.validate.outputs.valid == 'true' }}
|
||||
run: |
|
||||
if [ "${{ github.ref_name }}" == "main" ]; then
|
||||
echo "tag=latest" >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
echo "tag=dev" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
|
||||
- name: Build and push
|
||||
if: ${{ steps.validate.outputs.valid == 'true' }}
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
tags: ${{ env.DOCKER_REGISTRY }}/${{ env.DOCKER_IMAGE }}:latest
|
||||
tags: ${{ env.DOCKER_REGISTRY }}/${{ env.DOCKER_IMAGE }}:${{ steps.docker_tag.outputs.tag }}
|
||||
provenance: false # avoids warnings on some registries
|
||||
|
||||
- name: Install kubectl
|
||||
@@ -73,7 +79,7 @@ jobs:
|
||||
echo "${{ secrets.KUBECONFIG }}" > kubeconfig
|
||||
|
||||
- name: Restart deployment and wait
|
||||
if: ${{ steps.validate.outputs.valid == 'true' }}
|
||||
if: ${{ steps.validate.outputs.valid == 'true' && github.ref_name == 'main' }}
|
||||
env:
|
||||
KUBECONFIG: ${{ github.workspace }}/kubeconfig
|
||||
run: |
|
||||
|
||||
+2
-2
@@ -19,7 +19,7 @@ spec:
|
||||
containers:
|
||||
- name: sync-backend-data-pool
|
||||
image: git.trai-infra.comstack.de/marian.lippitz/tap-frontend:latest
|
||||
command: ["php", "artisan", "schedule:run"]
|
||||
args: ["php", "artisan", "schedule:run"]
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: tap-frontend-config
|
||||
@@ -47,7 +47,7 @@ spec:
|
||||
containers:
|
||||
- name: sync-backend-data-pool
|
||||
image: git.trai-infra.comstack.de/marian.lippitz/tap-frontend:latest
|
||||
command: ["php", "artisan", "tinker", "--execute=dispatch(new App\\Jobs\\SyncBackendDataPool(fullSync: false, batchSize: 1000))"]
|
||||
args: ["php", "artisan", "tinker", "--execute=dispatch(new App\\Jobs\\SyncBackendDataPool(fullSync: false, batchSize: 1000))"]
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: tap-frontend-config
|
||||
|
||||
Reference in New Issue
Block a user