File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -14,13 +14,13 @@ jobs:
14
14
uses : actions/checkout@v3
15
15
16
16
- name : Build Docker image
17
- run : docker build -t your-dockerhub-username /yii2-app:latest .
17
+ run : docker build -t ${{ secrets.DOCKER_USERNAME }} /yii2-app:latest .
18
18
19
19
- name : Login to DockerHub
20
20
run : echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
21
21
22
22
- name : Push image
23
- run : docker push your-dockerhub-username /yii2-app:latest
23
+ run : docker push ${{ secrets.DOCKER_USERNAME }} /yii2-app:latest
24
24
25
25
- name : SSH & Deploy
26
26
uses : appleboy/ssh-action@v1.0.0
29
29
username : ${{ secrets.EC2_USER }}
30
30
key : ${{ secrets.EC2_SSH_KEY }}
31
31
script : |
32
- docker pull your-dockerhub-username /yii2-app:latest
33
- docker service update --image your-dockerhub-username /yii2-app:latest yii2_app
32
+ docker pull ${{ secrets.DOCKER_USERNAME }} /yii2-app:latest
33
+ docker service update --image ${{ secrets.DOCKER_USERNAME }} /yii2-app:latest yii2_app
You can’t perform that action at this time.
0 commit comments