From 75f3ccce9c027540d58fa02daad09904dce321c8 Mon Sep 17 00:00:00 2001 From: donavon04 Date: Fri, 30 Aug 2024 08:35:00 -0600 Subject: [PATCH] Create main.yml --- .github/workflows/main.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..196330e --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,33 @@ +name: Build and push Docker image to DockerHub + +on: + push: + branches: [ "main" ] + +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: 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/licensetrackerbackend:latest