Skip to content

Commit 3cb02ab

Browse files
committed
feat(docker): auto-publish
1 parent 3f152bb commit 3cb02ab

File tree

2 files changed

+35
-2
lines changed

2 files changed

+35
-2
lines changed

.github/workflows/build-docker.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Docker Compose Build and Push
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build_and_push:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Check out the repository, including submodules
14+
uses: actions/checkout@v3
15+
with:
16+
submodules: recursive
17+
path: web
18+
19+
- name: Set up Docker Buildx
20+
uses: docker/setup-buildx-action@v3
21+
22+
- name: Log in to Docker Hub
23+
uses: docker/login-action@v3
24+
with:
25+
username: ${{ secrets.DOCKER_USERNAME }}
26+
password: ${{ secrets.DOCKER_PASSWORD }}
27+
28+
- name: Build and push Docker images
29+
working-directory: ./web
30+
run: |
31+
npm install
32+
npm run build.docker
33+
docker compose push

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
"start.pubdev": "ng serve --configuration pubdev",
77
"start.proxy": "ng serve --configuration proxy",
88
"start": "ng serve",
9-
"start.docker": "npm run build.docker && docker-compose up",
9+
"start.docker": "npm run build.docker && docker compose up",
1010
"build": "npm run gen.changelog && ng build",
11-
"build.docker": "npm run build && docker-compose build",
11+
"build.docker": "npm run build && docker compose build",
1212
"build.pubdev": "npm run gen.changelog && ng build --configuration pubdev",
1313
"build.kyzikos": "npm run gen.changelog && ng build --configuration kyzikos && cp -r src/cgi-bin/ dist/web-frontend-angular/cgi-bin/",
1414
"build.kleobis": "npm run gen.changelog && ng build --configuration kleobis && cp src/matomo/kleobis.js dist/web-frontend-angular/*/assets/scripts/matomo.js && cp -r src/cgi-bin/ dist/web-frontend-angular/cgi-bin/",

0 commit comments

Comments
 (0)