File tree 1 file changed +25
-6
lines changed
1 file changed +25
-6
lines changed Original file line number Diff line number Diff line change 5
5
branches : [ "master" ]
6
6
pull_request :
7
7
branches : [ "master" ]
8
-
9
8
jobs :
10
9
11
10
build :
12
-
13
11
runs-on : ubuntu-latest
14
-
15
12
steps :
16
- - uses : actions/checkout@v4
17
- - name : Build the Docker image
18
- run : docker build . --file Dockerfile --tag bysir/drone-qiniu:latest
13
+ - uses : actions/checkout@v3
14
+
15
+ # https://github.com/docker/login-action
16
+ # get at https://hub.docker.com/settings/security, set on Github repository settings/secrets/actions
17
+ - name : Login to Docker Hub
18
+ uses : docker/login-action@v2
19
+ with :
20
+ username : ${{ secrets.DOCKERHUB_USERNAME }}
21
+ password : ${{ secrets.DOCKERHUB_TOKEN }}
22
+
23
+ # Extract metadata (tags, labels) for Docker
24
+ # https://github.com/docker/metadata-action
25
+ - name : Extract Docker metadata
26
+ id : meta
27
+ uses : docker/metadata-action@v4
28
+ with :
29
+ images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
30
+
31
+ # https://github.com/docker/build-push-action#git-context
32
+ - name : Build and push Docker
33
+ uses : docker/build-push-action@v3
34
+ with :
35
+ push : true
36
+ tags : ${{ steps.meta.outputs.tags }}
37
+ labels : ${{ steps.meta.outputs.labels }}
You can’t perform that action at this time.
0 commit comments