From 0d58225a8c462f15ecade95229119836a2bbbf4d Mon Sep 17 00:00:00 2001 From: Arata Date: Mon, 4 Mar 2024 18:19:59 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=E3=82=A4=E3=83=A1=E3=83=BC=E3=82=B8?= =?UTF-8?q?=E3=81=AE=E3=83=93=E3=83=AB=E3=83=89=E6=96=B9=E6=B3=95=E3=82=92?= =?UTF-8?q?=E5=A4=89=E6=9B=B4=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/cd-staging.yml | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/.github/workflows/cd-staging.yml b/.github/workflows/cd-staging.yml index faa12f5..460e65f 100644 --- a/.github/workflows/cd-staging.yml +++ b/.github/workflows/cd-staging.yml @@ -9,16 +9,27 @@ jobs: push-image: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - name: Checkout + uses: actions/checkout@v4 + - name: Docker meta + id: docker_meta + uses: docker/metadata-action@v4 + with: + images: ghcr.io/twin-te/twinte-back + tags: | + dev - name: Login to GitHub Container Registry uses: docker/login-action@v2 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Set Tag Name - run: echo "TAG_NAME=ghcr.io/twin-te/twinte-back:sha-${GITHUB_SHA}" >> $GITHUB_ENV - - name: Build - run: docker build -f deploy.Dockerfile -t $TAG_NAME . - - name: Push - run: docker push $TAG_NAME + - name: Build and push + uses: docker/build-push-action@v2 + with: + context: . + file: deploy.Dockerfile + push: true + tags: ${{ steps.docker_meta.outputs.tags }} + cache-from: type=gha + cache-to: type=gha,mode=max