Skip to content

Update docker-image.yml #6

Update docker-image.yml

Update docker-image.yml #6

Workflow file for this run

name: Build and Push Docker Image to Harbor
on:
push:
branches:
- main
env:
# 환경 변수 설정: 구성 변수 값을 사용
HARBOR_USER: ${{ vars.HARBOR_USER }}
REPO_URL: ${{ vars.REPO_URL }}
TOKEN: ${{ vars.TOKEN }}
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Log in to Harbor
run: echo $TOKEN | docker login $REPO_URL -u $HARBOR_USER --password-stdin
- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .
file: ./Dockerfile
push: true
tags: $REPO_URL/test:latest