Skip to content

Build and Push Docker Image #4

Build and Push Docker Image

Build and Push Docker Image #4

name: Build and Push Docker Image
on:
workflow_dispatch:
env:
DOCKER_REPO: node20
DOCKER_IMAGE: chrome-browser
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Log in to Harbor
run: echo "${{ secrets.HARBOR_PASSWORD }}" | docker login https://harbor.internal.codebuckets.in -u '${{ secrets.HARBOR_USER }}' --password-stdin
- name: Build Docker image
run: docker build -t harbor.internal.codebuckets.in/${{ env.DOCKER_REPO }}/${{ env.DOCKER_IMAGE }}:latest . -f node20/Dockerfile-ChromeBrowser
- name: Push Docker image
run: docker push harbor.internal.codebuckets.in/${{ env.DOCKER_REPO }}/${{ env.DOCKER_IMAGE }}:latest