Skip to content

Merge remote-tracking branch 'github/master' #16

Merge remote-tracking branch 'github/master'

Merge remote-tracking branch 'github/master' #16

Workflow file for this run

name: Build and Push Docker Image
# Controls when the action will run.
on:
push:
branches:
- master # Only run on push to the main branch
pull_request:
branches:
- master # Run on pull requests to the main branch
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '22' # Specify Node.js version if needed
- name: Install dependencies
run: npm install # Uses 'ci' to ensure a clean install of dependencies
- name: Build the React app
run: npm run build
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{github.actor}}
password: ${{secrets.GHCR_DEPLOY_TOKEN}}
- name: Build and tag the Docker image
run: |
docker build -t ghcr.io/teamwize/dashboard-app:latest -f docker/Dockerfile .
- name: Push the Docker image
run: |
docker push ghcr.io/teamwize/dashboard-app:latest