licensetrackerfrontend/.github/workflows/main.yml

40 lines
864 B
YAML
Raw Normal View History

2024-08-30 08:32:07 -06:00
name: Build and push Docker image to DockerHub
on:
push:
2024-08-30 08:38:25 -06:00
branches: [ "master" ]
2024-08-30 08:32:07 -06:00
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Set up Node.js (if you're using Node.js for building)
uses: actions/setup-node@v3
with:
node-version: '22' # Adjust the Node.js version as needed
- name: Install dependencies
run: npm install
- name: Build project
run: npm run build
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push to DockerHub
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: mpeadmin/licensetrackerfrontend:latest