Skip to content

Commit

Permalink
Update docker-image.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
idoyo7 authored Aug 4, 2024
1 parent 5a022ba commit fea36f3
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ on:
branches:
- main

env:
# 환경 변수 설정: 구성 변수 값을 사용
HARBOR_USER: ${{ vars.HARBOR_USER }}
REPO_URL: ${{ vars.REPO_URL }}
TOKEN: ${{ vars.TOKEN }}

jobs:
build-and-push:
runs-on: ubuntu-latest
Expand All @@ -16,15 +22,8 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Display environment variables
run: |
echo "HARBOR_USER: $HARBOR_USER"
echo "REPO_URL: $REPO_URL"
echo "TOKEN: ${{ secrets.TOKEN }}"
- name: Log in to Harbor
run: |
echo "${{ secrets.TOKEN }}" | docker login "$REPO_URL" -u "$HARBOR_USER" --password-stdin
run: echo $TOKEN | docker login $REPO_URL -u $HARBOR_USER --password-stdin

- name: Build and push Docker image
uses: docker/build-push-action@v4
Expand Down

0 comments on commit fea36f3

Please sign in to comment.