File tree Expand file tree Collapse file tree 3 files changed +106
-30
lines changed
Expand file tree Collapse file tree 3 files changed +106
-30
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ name : Docker
2+
3+ on :
4+ push :
5+ branches : [ "main" ]
6+ tags :
7+ - ' *'
8+
9+ jobs :
10+ build :
11+ runs-on : ubuntu-latest
12+
13+ permissions :
14+ actions : write
15+ checks : write
16+ contents : write
17+ deployments : write
18+ id-token : write
19+ issues : write
20+ pull-requests : write
21+ security-events : write
22+ statuses : write
23+
24+ steps :
25+ - uses : actions/checkout@v4
26+
27+ - name : Docker meta
28+ id : meta
29+ uses : docker/metadata-action@v5
30+ with :
31+ images : ${{ github.repository }}
32+ tags : |
33+ type=raw,value=latest,enable={{is_default_branch}}
34+ type=semver,pattern={{version}}
35+
36+ - name : Login to Docker Hub
37+ uses : docker/login-action@v3
38+ with :
39+ username : ${{ secrets.DOCKER_USERNAME }}
40+ password : ${{ secrets.DOCKER_TOKEN }}
41+
42+ - name : Build and push
43+ uses : docker/build-push-action@v5
44+ with :
45+ context : .
46+ file : Dockerfile
47+ platforms : linux/amd64,linux/arm64,linux/arm
48+ push : true
49+ tags : ${{ steps.meta.outputs.tags }}
50+ labels : ${{ steps.meta.outputs.labels }}
Original file line number Diff line number Diff line change 1+ name : Docker Variants
2+
3+ on :
4+ push :
5+ branches : [ "main" ]
6+ tags :
7+ - ' *'
8+
9+ jobs :
10+ build :
11+ runs-on : ubuntu-latest
12+ strategy :
13+ fail-fast : false
14+ matrix :
15+ variant :
16+ - alpine
17+ - slim
18+
19+ permissions :
20+ actions : write
21+ checks : write
22+ contents : write
23+ deployments : write
24+ id-token : write
25+ issues : write
26+ pull-requests : write
27+ security-events : write
28+ statuses : write
29+
30+ steps :
31+ - uses : actions/checkout@v4
32+
33+ - name : Docker meta
34+ id : meta
35+ uses : docker/metadata-action@v5
36+ with :
37+ images : ${{ github.repository }}
38+ tags : |
39+ type=raw,value=${{ matrix.variant }},enable={{is_default_branch}}
40+ type=semver,pattern={{version}}-${{ matrix.variant }}
41+
42+ - name : Login to Docker Hub
43+ uses : docker/login-action@v3
44+ with :
45+ username : ${{ secrets.DOCKER_USERNAME }}
46+ password : ${{ secrets.DOCKER_TOKEN }}
47+
48+ - name : Build and push
49+ uses : docker/build-push-action@v5
50+ with :
51+ context : .
52+ file : Dockerfile.${{ matrix.variant }}
53+ platforms : linux/amd64,linux/arm64,linux/arm
54+ push : true
55+ tags : ${{ steps.meta.outputs.tags }}
56+ labels : ${{ steps.meta.outputs.labels }}
You can’t perform that action at this time.
0 commit comments