File tree Expand file tree Collapse file tree 3 files changed +82
-7
lines changed Expand file tree Collapse file tree 3 files changed +82
-7
lines changed Original file line number Diff line number Diff line change
1
+ changelog :
2
+ exclude :
3
+ labels :
4
+ - ignore-for-release
5
+ categories :
6
+ - title : ' 🚀 Features'
7
+ labels :
8
+ - ' feature'
9
+ - title : ' 🐛 Bug Fixes'
10
+ labels :
11
+ - ' bug'
12
+ - title : 📝 Documentation updates
13
+ labels :
14
+ - documentation
15
+ - title : 👻 Maintenance
16
+ labels :
17
+ - dependencies
18
+ - title : 🚦 Tests
19
+ labels :
20
+ - tests
21
+ - title : Other Changes
22
+ labels :
23
+ - " *"
Original file line number Diff line number Diff line change
1
+ name : CI
2
+
3
+ on :
4
+ push :
5
+ tags :
6
+ - v*
7
+
8
+ jobs :
9
+ build :
10
+ runs-on : ubuntu-latest
11
+
12
+ steps :
13
+ - name : Checkout code
14
+ uses : actions/checkout@v3
15
+
16
+ - name : Set up QEMU
17
+ uses : docker/setup-qemu-action@v3
18
+
19
+ - name : Inject slug/short variables
20
+ uses : rlespinasse/github-slug-action@v4
21
+
22
+ - name : Set up Docker Buildx
23
+ id : buildx
24
+ uses : docker/setup-buildx-action@v3
25
+ with :
26
+ driver : docker-container
27
+
28
+ - name : Available platforms
29
+ run : echo ${{ steps.buildx.outputs.platforms }}
30
+
31
+ - name : Login to Docker Hub
32
+ uses : docker/login-action@v3
33
+ with :
34
+ username : ${{ secrets.DOCKERHUB_USER }}
35
+ password : ${{ secrets.DOCKERHUB_TOKEN }}
36
+
37
+ - name : Set env variables
38
+ id : set_env
39
+ run : |
40
+ echo "TAG_NAME=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
41
+
42
+ - name : Build and push
43
+ uses : docker/build-push-action@v6
44
+ with :
45
+ context : .
46
+ file : ./Dockerfile-nginx
47
+ platforms : linux/amd64,linux/arm64
48
+ push : true
49
+ build-args : |
50
+ VERSION=${{ env.TAG_NAME }}
51
+ tags : |
52
+ cairry/watchalert-web:latest
53
+ cairry/watchalert-web:${{ env.TAG_NAME }}
Original file line number Diff line number Diff line change 3
3
on :
4
4
push :
5
5
branches :
6
- - master
6
+ - ' */* '
7
7
8
8
jobs :
9
9
build :
22
22
- name : Set up Docker Buildx
23
23
id : buildx
24
24
uses : docker/setup-buildx-action@v3
25
+ with :
26
+ driver : docker-container
25
27
26
28
- name : Available platforms
27
29
run : echo ${{ steps.buildx.outputs.platforms }}
@@ -36,18 +38,15 @@ jobs:
36
38
id : set_env
37
39
run : |
38
40
echo "BRANCH_NAME=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
39
- echo "SHORT_SHA=${GITHUB_SHA:0:4}" >> $GITHUB_ENV
40
- echo "DATE=$(TZ=Asia/Shanghai date +%Y-%m-%d.%H-%M-%S)" >> $GITHUB_ENV
41
41
42
42
- name : Build and push
43
43
uses : docker/build-push-action@v6
44
44
with :
45
45
context : .
46
46
file : ./Dockerfile-nginx
47
- platforms : linux/arm64 ,linux/amd64
48
- push : ${{ github.event_name != 'pull_request' }}
47
+ platforms : linux/amd64 ,linux/arm64
48
+ push : true
49
49
build-args : |
50
50
VERSION=${{ env.DATE }}
51
51
tags : |
52
- cairry/watchalert-web:latest
53
- cairry/watchalert-web:${{ env.BRANCH_NAME }}.${{ env.DATE }}.${{ env.SHORT_SHA }}
52
+ cairry/watchalert-web:${{ env.BRANCH_NAME }}
You can’t perform that action at this time.
0 commit comments