@@ -15,78 +15,74 @@ concurrency:
1515
1616jobs :
1717 docker-build-demo :
18- # We can skip deployment by adding [skip] in the commit body
19- if : " !contains(github.event.head_commit.message, '[skip]')"
2018 runs-on : ubuntu-latest
2119
2220 steps :
23- - uses : actions/checkout@v3
21+ - uses : actions/checkout@v4
2422 - name : Set up dockertags
2523 run : |
2624 echo "dockertags=digisquad/cssninja.hr-demo:latest" >> $GITHUB_ENV
2725
2826 - name : Set up QEMU
29- uses : docker/setup-qemu-action@v2
27+ uses : docker/setup-qemu-action@v3
3028
3129 - name : Set up Docker Buildx
32- uses : docker/setup-buildx-action@v2
30+ uses : docker/setup-buildx-action@v3
3331
3432 - name : Login to DockerHub
35- uses : docker/login-action@v2
33+ uses : docker/login-action@v3
3634 with :
3735 username : ${{ secrets.DOCKERHUB_USERNAME }}
3836 password : ${{ secrets.DOCKERHUB_TOKEN }}
3937
4038 - name : Build and push
4139 id : docker_build
42- uses : docker/build-push-action@v3
40+ uses : docker/build-push-action@v5
4341 timeout-minutes : 60
4442 with :
4543 push : true
4644 tags : ${{ env.dockertags }}
47- cache-from : type=registry,ref=${{ env.dockertags }}
48- cache-to : type=inline
45+ cache-from : type=gha
46+ cache-to : type=gha,mode=max
4947
5048 docker-build-api :
51- # We can skip deployment by adding [skip] in the commit body
52- if : " !contains(github.event.head_commit.message, '[skip]')"
5349 runs-on : ubuntu-latest
5450
5551 steps :
56- - uses : actions/checkout@v3
52+ - uses : actions/checkout@v4
5753 - name : Set up dockertags
5854 run : |
5955 echo "dockertags=digisquad/cssninja.hr-api:latest" >> $GITHUB_ENV
6056
6157 - name : Set up QEMU
62- uses : docker/setup-qemu-action@v2
58+ uses : docker/setup-qemu-action@v3
6359
6460 - name : Set up Docker Buildx
65- uses : docker/setup-buildx-action@v2
61+ uses : docker/setup-buildx-action@v3
6662
6763 - name : Login to DockerHub
68- uses : docker/login-action@v2
64+ uses : docker/login-action@v3
6965 with :
7066 username : ${{ secrets.DOCKERHUB_USERNAME }}
7167 password : ${{ secrets.DOCKERHUB_TOKEN }}
7268
7369 - name : Build and push
7470 id : docker_build
75- uses : docker/build-push-action@v3
71+ uses : docker/build-push-action@v5
7672 timeout-minutes : 60
7773 with :
7874 file : ./Dockerfile.api
7975 push : true
8076 tags : ${{ env.dockertags }}
81- cache-from : type=registry,ref=${{ env.dockertags }}
82- cache-to : type=inline
77+ cache-from : type=gha
78+ cache-to : type=gha,mode=max
8379
8480 deploy :
8581 runs-on : ubuntu-latest
8682 needs : [docker-build-demo, docker-build-api]
8783
8884 steps :
89- - uses : actions/checkout@v3
85+ - uses : actions/checkout@v4
9086 - name : Prepare
9187 uses : appleboy/ssh-action@master
9288 with :
@@ -114,5 +110,5 @@ jobs:
114110 script_stop : true
115111 script : |
116112 cd ${{ secrets.HOST_DIRECTORY }}
117- docker- compose pull
118- docker- compose up -d --force-recreate --remove-orphans
113+ docker compose pull
114+ docker compose up -d --force-recreate --remove-orphans
0 commit comments