From 20916925809d4679792f507f38ef41adf8d5239b Mon Sep 17 00:00:00 2001 From: Harshal Sheth Date: Sat, 14 Dec 2024 22:47:29 -0500 Subject: [PATCH] tweak docker build --- .github/workflows/docker-images.yml | 32 ++++++++++++++--------------- .vscode/settings.json | 16 +++++++-------- docker-compose.yml | 2 -- 3 files changed, 23 insertions(+), 27 deletions(-) diff --git a/.github/workflows/docker-images.yml b/.github/workflows/docker-images.yml index 468039b..8e76f41 100644 --- a/.github/workflows/docker-images.yml +++ b/.github/workflows/docker-images.yml @@ -2,9 +2,9 @@ name: Docker Images CI on: push: - branches: [ main ] + branches: [main] pull_request: - branches: [ main ] + branches: [main] permissions: contents: read @@ -17,18 +17,18 @@ jobs: PUSH_IMAGES: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} steps: - - uses: actions/checkout@v2 - - name: Build the Docker images - run: docker-compose build - - - name: Log in to the Container registry - if: ${{ env.PUSH_IMAGES == 'true' }} - uses: docker/login-action@v1 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} + - uses: actions/checkout@v4 + - name: Build the Docker images + run: docker compose build - - name: Publish the Docker images - if: ${{ env.PUSH_IMAGES == 'true' }} - run: docker-compose push + - name: Log in to the Container registry + if: ${{ env.PUSH_IMAGES == 'true' }} + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Publish the Docker images + if: ${{ env.PUSH_IMAGES == 'true' }} + run: docker compose push diff --git a/.vscode/settings.json b/.vscode/settings.json index 3d5e3fd..f067d57 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,10 +1,8 @@ { - "editor.codeActionsOnSave": { - "source.fixAll.eslint": true - }, - "eslint.format.enable": true, - "eslint.packageManager": "yarn", - "eslint.workingDirectories": [ - {"mode": "auto"} - ] -} \ No newline at end of file + "editor.codeActionsOnSave": { + "source.fixAll.eslint": "explicit" + }, + "eslint.format.enable": true, + "eslint.packageManager": "yarn", + "eslint.workingDirectories": [{ "mode": "auto" }] +} diff --git a/docker-compose.yml b/docker-compose.yml index cac1719..38a58d9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,5 +1,3 @@ -version: '2' - services: frontend: image: ghcr.io/hsheth2/ppa-stats-frontend:latest