Skip to content

Commit 30da1ef

Browse files
author
nimuy99
committed
#141 Deploy: docker 캐시 활용
1 parent b2b494c commit 30da1ef

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

.github/workflows/deploy.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,16 @@ jobs:
3636
uses: actions/upload-artifact@v4
3737
with:
3838
name: docker-compose
39-
path: |
40-
docker-compose.yml
39+
path: docker-compose.yml
4140

4241
- name: Login to DockerHub
4342
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
4443

4544
- name: Build and push Docker image
4645
run: |
47-
docker build -t ${{ secrets.DOCKER_USERNAME }}/${{ vars.MY_APP }}:latest .
46+
docker build --cache-from=type=registry,ref=${{ secrets.DOCKER_USERNAME }}/${{ vars.MY_APP }}:latest \
47+
--cache-to=type=inline \
48+
-t ${{ secrets.DOCKER_USERNAME }}/${{ vars.MY_APP }}:latest .
4849
docker push ${{ secrets.DOCKER_USERNAME }}/${{ vars.MY_APP }}:latest
4950
5051
deploy:

0 commit comments

Comments
 (0)