@@ -19,53 +19,38 @@ jobs:
1919 # ### Build and push image
2020 build-and-push-image :
2121 runs-on : ubuntu-latest
22- needs : checks
22+
2323 permissions :
2424 contents : read
2525 packages : write
2626
2727 steps :
2828 - name : Checkout repository
29- uses : actions/checkout@v3
30-
31- - name : Set up QEMU
32- uses : docker/setup-qemu-action@v1
33-
34- - name : Set up Docker Buildx
35- uses : docker/setup-buildx-action@v1
29+ uses : actions/checkout@v4
3630
3731 - name : Login to GitHub Packages
38- uses : docker/login-action@v1
32+ uses : docker/login-action@v3
3933 with :
4034 registry : ${{ env.REGISTRY }}
4135 username : ${{ github.actor }}
4236 password : ${{ secrets.GITHUB_TOKEN }}
4337
4438 - name : Prepare metadata
4539 id : meta
46- uses : docker/metadata-action@v3
40+ uses : docker/metadata-action@v5
4741 with :
4842 images : ghcr.io/${{ env.IMAGE_NAME }}
4943 tags : |
5044 type=ref,event=branch
5145 type=ref,event=pr
5246 type=ref,event=tag
47+ type=sha
5348
5449 - name : Build and push
55- uses : docker/build-push-action@v2
50+ uses : docker/build-push-action@v6
5651 with :
5752 build-args : |
5853 APP_RELEASE=${{ github.sha }}
5954 push : ${{ github.event_name != 'pull_request' }}
6055 tags : ${{ steps.meta.outputs.tags }}
6156 labels : ${{ steps.meta.outputs.labels }}
62-
63- - name : Deploy the new image
64- uses : appleboy/ssh-action@master
65- with :
66- host : ${{ secrets.HOST }}
67- username : ${{ secrets.USER }}
68- key : ${{ secrets.KEY }}
69- script : |
70- cd ~/stacks
71- docker stack deploy -c package.yml package --with-registry-auth
0 commit comments