@@ -2,22 +2,43 @@ name: build
2
2
on :
3
3
push :
4
4
branches :
5
- - master
5
+ - master
6
6
paths-ignore :
7
- - .gitignore
8
- - README.md
9
- - ' .github/ISSUE_TEMPLATE/**'
7
+ - .gitignore
8
+ - README.md
9
+ - ' .github/ISSUE_TEMPLATE/**'
10
+ release :
11
+ types : [published]
12
+
10
13
jobs :
11
14
build :
12
15
runs-on : ubuntu-latest
13
16
steps :
14
- - name : Checkout Source
15
- uses : actions/checkout@v1
16
- - name : Docker Login
17
- run : docker login -u germey -p ${{ secrets.DOCKERHUB_LOGIN_PASSWORD }}
18
- - name : Build the Docker Image
19
- run : docker-compose -f build.yaml build
20
- - name : Tag and Push Master Version
21
- run : |
22
- docker push germey/proxypool:master
23
-
17
+ - name : Checkout
18
+ uses : actions/checkout@v2
19
+
20
+ - name : Set up QEMU
21
+ uses : docker/setup-qemu-action@v1
22
+
23
+ - name : Set up Docker Buildx
24
+ uses : docker/setup-buildx-action@v1
25
+
26
+ - name : Login to DockerHub
27
+ uses : docker/login-action@v1
28
+ with :
29
+ username : germey
30
+ password : ${{ secrets.DOCKERHUB_LOGIN_PASSWORD }}
31
+
32
+ - name : Extract branch name
33
+ id : branch
34
+ shell : bash
35
+ run : echo "##[set-output name=tag;]$(echo ${GITHUB_REF##*/} | sed 's/master/latest/')"
36
+
37
+ - name : Build and push
38
+ uses : docker/build-push-action@v2
39
+ with :
40
+ context : .
41
+ push : true
42
+ platforms : linux/amd64
43
+ tags : |
44
+ germey/proxypool:${{ steps.branch.outputs.tag }}
0 commit comments