@@ -13,18 +13,18 @@ jobs:
1313 uses : actions/checkout@v4
1414
1515 - name : Login to DockerHub
16- uses : docker/login-action@v1
16+ uses : docker/login-action@v3
1717 with :
1818 username : ${{ secrets.DOCKER_HUB_USERNAME }}
1919 password : ${{ secrets.DOCKER_HUB_TOKEN }}
2020
2121 - name : Docker Build and Push
22- uses : docker/build-push-action@v5
22+ uses : docker/build-push-action@v6
2323 with :
2424 context : .
25+ push : true
2526 file : ./Dockerfile
2627 platforms : linux/amd64
27- push : true
2828 tags : |
2929 ${{ secrets.DOCKER_HUB_USERNAME }}/server:${{ github.run_number }}
3030 ${{ secrets.DOCKER_HUB_USERNAME }}/server:latest
@@ -34,41 +34,13 @@ jobs:
3434 runs-on : self-hosted
3535 steps :
3636 - name : deploy
37- run : |
38- cd /home/ubuntu
39- sudo chmod +x ./deploy.sh
40- sudo ./deploy.sh
37+ run : cd /home/ubuntu && ./deploy.sh
4138
4239 - name : Send Failure Message
4340 if : ${{ failure() }}
44414542 env :
4643 DISCORD_WEBHOOK : ${{ secrets.DEPLOY_WEBHOOK_URL }}
4744 DISCORD_USERNAME : 배포봇
48- DISCORD_EMBEDS : |
49- [
50- {
51- "author": {
52- "name": "${{ github.event.pull_request.user.login }}",
53- "url": "https://github.com/techbloghub/server",
54- "icon_url": "${{ github.event.pull_request.user.avatar_url }}"
55- },
56- "title": "배포 실패! \n #${{ github.event.pull_request.number }} : ${{ github.event.pull_request.title }}",
57- "color": 13458524,
58- "description": "${{ github.event.pull_request.html_url }}",
59- "fields": [
60- {
61- "name": "Base Branch",
62- "value": "${{ github.base_ref }}",
63- "inline": true
64- },
65- {
66- "name": "Compare Branch",
67- "value": "${{ github.head_ref }}",
68- "inline": true
69- }
70- ]
71- }
72- ]
7345 with :
74- args : ' '
46+ args : ' The deployment of techbloghub/{{ EVENT_PAYLOAD.repository.full_name }} has failed '
0 commit comments