From d557c88737d9147cde29ae058f8849b1e6dd68a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20H=C3=A4ssig?= Date: Wed, 16 Oct 2024 16:55:56 +0200 Subject: [PATCH] build and push docker images --- .github/workflows/docker-images.yaml | 36 ++++++++++++++++++++++++++++ frontend/package-lock.json | 16 ++++++------- 2 files changed, 44 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/docker-images.yaml diff --git a/.github/workflows/docker-images.yaml b/.github/workflows/docker-images.yaml new file mode 100644 index 0000000..b0b24f8 --- /dev/null +++ b/.github/workflows/docker-images.yaml @@ -0,0 +1,36 @@ +name: Docker Image CI + +on: + push: + branches: ["main"] + pull_request: + branches: ["main"] + +jobs: + build-tasks-api: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Log in to GHCR + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: "Tasks API: Build and push Docker image" + uses: docker/build-push-action@v6 + with: + push: ${{ github.event_name != 'pull_request' }} + context: backend/tasks + tags: | + ghcr.io/${{ github.repository }}/tasks:latest + ghcr.io/${{ github.repository }}/tasks:${{ github.sha }} + - name: "Frontend: Build and push Docker image" + uses: docker/build-push-action@v6 + with: + push: ${{ github.event_name != 'pull_request' }} + context: frontend + tags: | + ghcr.io/${{ github.repository }}/frontend:latest + ghcr.io/${{ github.repository }}/frontend:${{ github.sha }} diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 00c40a3..cf5373a 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -1014,9 +1014,9 @@ } }, "node_modules/@sveltejs/kit": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/@sveltejs/kit/-/kit-2.6.1.tgz", - "integrity": "sha512-QFlch3GPGZYidYhdRAub0fONw8UTguPICFHUSPxNkA/jdlU1p6C6yqq19J1QWdxIHS2El/ycDCGrHb3EAiMNqg==", + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/@sveltejs/kit/-/kit-2.7.1.tgz", + "integrity": "sha512-TBVnkwgYQT3EafGQK6Eyh5FlLEBlRhCmqPTwcdOs+QdnyUc3eCAxRWtXlFxIWtmk6pqv11zdng8qTpThdTogew==", "dev": true, "hasInstallScript": true, "license": "MIT", @@ -1031,7 +1031,7 @@ "mrmime": "^2.0.0", "sade": "^1.8.1", "set-cookie-parser": "^2.6.0", - "sirv": "^2.0.4", + "sirv": "^3.0.0", "tiny-glob": "^0.2.9" }, "bin": { @@ -3787,9 +3787,9 @@ } }, "node_modules/sirv": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/sirv/-/sirv-2.0.4.tgz", - "integrity": "sha512-94Bdh3cC2PKrbgSOUqTiGPWVZeSiXfKOVZNJniWoqrWrRkB1CJzBU3NEbiTsPcYy1lDsANA/THzS+9WBiy5nfQ==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/sirv/-/sirv-3.0.0.tgz", + "integrity": "sha512-BPwJGUeDaDCHihkORDchNyyTvWFhcusy1XMmhEVTQTwGeybFbp8YEmB+njbPnth1FibULBSBVwCQni25XlCUDg==", "dev": true, "license": "MIT", "dependencies": { @@ -3798,7 +3798,7 @@ "totalist": "^3.0.0" }, "engines": { - "node": ">= 10" + "node": ">=18" } }, "node_modules/source-map-js": {