Skip to content

Commit

Permalink
feat(docker): auto-publish
Browse files Browse the repository at this point in the history
  • Loading branch information
esoadamo committed Nov 10, 2024
1 parent 3f152bb commit 3cb02ab
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 2 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/build-docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Docker Compose Build and Push

on:
push:
branches:
- main

jobs:
build_and_push:
runs-on: ubuntu-latest

steps:
- name: Check out the repository, including submodules
uses: actions/checkout@v3
with:
submodules: recursive
path: web

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build and push Docker images
working-directory: ./web
run: |
npm install
npm run build.docker
docker compose push
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
"start.pubdev": "ng serve --configuration pubdev",
"start.proxy": "ng serve --configuration proxy",
"start": "ng serve",
"start.docker": "npm run build.docker && docker-compose up",
"start.docker": "npm run build.docker && docker compose up",
"build": "npm run gen.changelog && ng build",
"build.docker": "npm run build && docker-compose build",
"build.docker": "npm run build && docker compose build",
"build.pubdev": "npm run gen.changelog && ng build --configuration pubdev",
"build.kyzikos": "npm run gen.changelog && ng build --configuration kyzikos && cp -r src/cgi-bin/ dist/web-frontend-angular/cgi-bin/",
"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/",
Expand Down

0 comments on commit 3cb02ab

Please sign in to comment.