From b093ddcb02e1ef9416238f0725c57ea6b23e9dce Mon Sep 17 00:00:00 2001 From: byungjin Date: Tue, 16 May 2023 03:06:28 +0900 Subject: [PATCH] chore: Update Docker Deploy Action --- .github/workflows/deploy-club.yml | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy-club.yml b/.github/workflows/deploy-club.yml index ead4e61..5702a81 100644 --- a/.github/workflows/deploy-club.yml +++ b/.github/workflows/deploy-club.yml @@ -5,16 +5,37 @@ on: - Club-v*.*.* jobs: - build: + build-and-push-image: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v2 + # import env - name: Create .env file run: | touch .env echo "${{ secrets.ENV_CLUB }}" >> .env + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Login to DockerHub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Build and Push + uses: docker/build-push-action@v4 + with: + context: . + push: true + tags: byungjinlee/byungjin-pri:latest + file: dockerFiles/club.Dockerfile + cache-from: type=gha + cache-to: type=gha,mode=max + #run: docker build -f dockerFiles/club.Dockerfile -t megabrain/club-app . # # 도커 이미지 버전 가져오기 # - name: Get the version # id: get_version