ci: separate dev workflow so merging dev keeps main's build intact
Build and Deploy (dev) / build (push) Successful in 15m29s

build-docker.yml (main, :latest) is restored to match main;
build-docker-dev.yml only triggers on dev and tags :dev.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
eric.busandClaude Opus 5.5 committed 2026-11-20 10:43:02 +01:00
1 parent e6ac760a64
commit a11dca62a4
2 files changed
+62 -6

No files matched your search

+50
View File
@@ -0,0 +1,50 @@
name: Build and Deploy (dev)
run-name: ${{ gitea.actor }} is building ${{ gitea.repository }}
on:
push:
branches:
- dev
jobs:
build:
runs-on: ubuntu-latest
env:
REGISTRY: git.gooienmeer.nl
IMAGE: git.gooienmeer.nl/nh_gooi/nhgooi.nl
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Login to Gitea Container Registry
run: |
echo "${{ secrets.REGISTRY_TOKEN }}" | \
docker login "$REGISTRY" \
-u "${{ gitea.actor }}" \
--password-stdin
- name: Build image
run: |
docker build \
-t "$IMAGE:${{ gitea.sha }}" \
-t "$IMAGE:dev" \
.
- name: Push image
run: |
docker push "$IMAGE:${{ gitea.sha }}"
docker push "$IMAGE:dev"
# - name: Trigger deployment
# run: |
# curl --fail-with-body \
# -X POST \
# -H "Content-Type: application/json" \
# -d '{
# "image": "'"$IMAGE:${{ gitea.sha }}"'",
# "commit": "${{ gitea.sha }}",
# "repository": "${{ gitea.repository }}"
# }' \
# "${{ secrets.DEPLOY_WEBHOOK_URL }}"
+12 -6
View File
@@ -1,18 +1,24 @@
name: Build and Deploy (dev)
name: Build and Deploy
run-name: ${{ gitea.actor }} is building ${{ gitea.repository }}
on:
push:
branches:
- dev
- main
paths:
- 'Dockerfile'
- 'composer.json'
- 'composer.lock'
- '.gitea/workflows/build-docker.yml'
- 'version' # Change this file to force rebuild
jobs:
build:
runs-on: ubuntu-latest
env:
REGISTRY: git.gooienmeer.nl
IMAGE: git.gooienmeer.nl/nh_gooi/nhgooi.nl
REGISTRY: git.nhgooi.nl
IMAGE: git.nhgooi.nl/nh_gooi/nhgooi.nl
steps:
- name: Checkout
@@ -29,13 +35,13 @@ jobs:
run: |
docker build \
-t "$IMAGE:${{ gitea.sha }}" \
-t "$IMAGE:dev" \
-t "$IMAGE:latest" \
.
- name: Push image
run: |
docker push "$IMAGE:${{ gitea.sha }}"
docker push "$IMAGE:dev"
docker push "$IMAGE:latest"
# - name: Trigger deployment
# run: |