Update workflow for path
This commit is contained in:
@@ -2,25 +2,34 @@ name: Build, Push and Run Container
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches: [main]
|
||||||
- main
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ap-host
|
runs-on: ap-host
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- run: which docker && docker --version
|
- name: Sanity: docker & node
|
||||||
- run: which node && node --version || echo "node not found"
|
run: |
|
||||||
|
which docker && docker --version
|
||||||
|
which node && node --version || echo "node not found"
|
||||||
|
|
||||||
- name: Checkout source code
|
- name: Checkout source code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Build Docker image
|
- name: Docker login (private registry)
|
||||||
run: |
|
run: |
|
||||||
docker build -t docker-registry.automatic-parking.dev/automatic-parking:poc Source/ProofOfConcept
|
docker login docker-registry.automatic-parking.dev \
|
||||||
|
--username server --password IXJHwwQK4ufKkhV
|
||||||
|
|
||||||
- name: Push to local registry
|
- name: Build Docker image (context = Source/ProofOfConcept)
|
||||||
|
run: |
|
||||||
|
DOCKER_BUILDKIT=1 docker build \
|
||||||
|
-f Source/ProofOfConcept/Dockerfile \
|
||||||
|
-t docker-registry.automatic-parking.dev/automatic-parking:poc \
|
||||||
|
Source
|
||||||
|
|
||||||
|
- name: Push to registry
|
||||||
run: docker push docker-registry.automatic-parking.dev/automatic-parking:poc
|
run: docker push docker-registry.automatic-parking.dev/automatic-parking:poc
|
||||||
|
|
||||||
- name: Stop existing container (if running)
|
- name: Stop existing container (if running)
|
||||||
@@ -34,10 +43,10 @@ jobs:
|
|||||||
docker run -d \
|
docker run -d \
|
||||||
--name automatic-parking \
|
--name automatic-parking \
|
||||||
--network traefik \
|
--network traefik \
|
||||||
--label "traefik.enable=true" \
|
--label 'traefik.enable=true' \
|
||||||
--label "traefik.http.routers.automatic-parking.rule=Host(`automatic-parking.dev`)" \
|
--label 'traefik.http.routers.automatic-parking.rule=Host(`automatic-parking.app`)' \
|
||||||
--label "traefik.http.routers.automatic-parking.entrypoints=websecure" \
|
--label 'traefik.http.routers.automatic-parking.entrypoints=websecure' \
|
||||||
--label "traefik.http.routers.automatic-parking.tls.certresolver=le" \
|
--label 'traefik.http.routers.automatic-parking.tls.certresolver=le' \
|
||||||
--label "traefik.http.services.automatic-parking.loadbalancer.server.port=8080" \
|
--label 'traefik.http.services.automatic-parking.loadbalancer.server.port=8080' \
|
||||||
--label "traefik.docker.network=traefik" \
|
--label 'traefik.docker.network=traefik' \
|
||||||
docker-registry.automatic-parking.dev/automatic-parking:poc
|
docker-registry.automatic-parking.dev/automatic-parking:poc
|
||||||
Reference in New Issue
Block a user