File tree 1 file changed +69
-0
lines changed
1 file changed +69
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : ci
2
+ # ref: https://github.com/docker/build-push-action/tree/master/docs/advanced
3
+
4
+ on :
5
+ schedule :
6
+ - cron : ' 0 10 * * *'
7
+ push :
8
+ branches :
9
+ - ' **'
10
+ tags :
11
+ - ' v*.*.*'
12
+ pull_request :
13
+ branches :
14
+ - ' master'
15
+
16
+ jobs :
17
+ docker :
18
+ runs-on : ubuntu-latest
19
+ steps :
20
+ -
21
+ name : Checkout
22
+ uses : actions/checkout@v3
23
+ -
24
+ name : Docker meta
25
+ id : meta
26
+ uses : docker/metadata-action@v4
27
+ with :
28
+ # list of Docker images to use as base name for tags
29
+ images : |
30
+ argcv/hou
31
+ # ghcr.io/username/app
32
+ # generate Docker tags based on the following events/attributes
33
+ tags : |
34
+ type=schedule
35
+ type=ref,event=branch
36
+ type=ref,event=pr
37
+ type=semver,pattern={{version}}
38
+ type=semver,pattern={{major}}.{{minor}}
39
+ type=semver,pattern={{major}}
40
+ type=sha
41
+ -
42
+ name : Set up QEMU
43
+ uses : docker/setup-qemu-action@v2
44
+ -
45
+ name : Set up Docker Buildx
46
+ uses : docker/setup-buildx-action@v2
47
+ -
48
+ name : Login to DockerHub
49
+ if : github.event_name != 'pull_request'
50
+ uses : docker/login-action@v2
51
+ with :
52
+ username : ${{ secrets.DOCKERHUB_USERNAME }}
53
+ password : ${{ secrets.DOCKERHUB_TOKEN }}
54
+ # -
55
+ # name: Login to GHCR
56
+ # if: github.event_name != 'pull_request'
57
+ # uses: docker/login-action@v2
58
+ # with:
59
+ # registry: ghcr.io
60
+ # username: ${{ github.repository_owner }}
61
+ # password: ${{ secrets.GITHUB_TOKEN }}
62
+ -
63
+ name : Build and push
64
+ uses : docker/build-push-action@v3
65
+ with :
66
+ context : .
67
+ push : ${{ github.event_name != 'pull_request' }}
68
+ tags : ${{ steps.meta.outputs.tags }}
69
+ labels : ${{ steps.meta.outputs.labels }}
You can’t perform that action at this time.
0 commit comments