Skip to content
This repository has been archived by the owner on Aug 18, 2024. It is now read-only.

Commit

Permalink
feat: イメージのビルド方法を変更した
Browse files Browse the repository at this point in the history
  • Loading branch information
arata-nvm committed Mar 4, 2024
1 parent 37eda45 commit 0d58225
Showing 1 changed file with 18 additions and 7 deletions.
25 changes: 18 additions & 7 deletions .github/workflows/cd-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 0d58225

Please sign in to comment.