Skip to content

add docker image build #1

add docker image build

add docker image build #1

Workflow file for this run

name: Build and Push Docker Image to Harbor
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
# Step 1: Checkout the code
- name: Checkout code
uses: actions/checkout@v3
# Step 2: Log in to Harbor
- name: Log in to Harbor Registry
uses: docker/login-action@v2
with:
registry: harbor.fayevr.dev
username: ${{ secrets.HARBOR_USERNAME }}
password: ${{ secrets.HARBOR_PASSWORD }}
# Step 3: Build and push Docker image
- name: Build and Push Docker Image
run: |
docker build -t harbor.fayevr.dev/fleet/nextjs-app:latest .
docker push harbor.fayevr.dev/fleet/nextjs-app:latest