File tree Expand file tree Collapse file tree 1 file changed +56
-0
lines changed
Expand file tree Collapse file tree 1 file changed +56
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Docker Image CI
2+
3+ on :
4+ push :
5+ branches : [ master ]
6+ pull_request :
7+ branches : [ master ]
8+
9+ jobs :
10+
11+ build :
12+
13+ runs-on : ubuntu-latest
14+ environment :
15+ name : prod-to-dockerhub
16+
17+ steps :
18+ - name : Checkout code
19+ uses : actions/checkout@v3
20+
21+ - name : Login to DockerHub
22+ uses : docker/login-action@v3
23+ with :
24+ username : ${{ secrets.PTDH_DOCKERHUB_USERNAME }}
25+ password : ${{ secrets.PTDH_DOCKERHUB_TOKEN }}
26+
27+ - name : Extract metadata (tags, labels) for Docker
28+ id : meta
29+ uses : docker/metadata-action@v3
30+ with :
31+ images : hyperprog/glowdash
32+ tags : |
33+ type=raw,value=latest
34+
35+ labels : |
36+ org.opencontainers.image.title=Glowdash
37+ org.opencontainers.image.description=The Smart Home Web Dashboard for Raspberry Pi and PC
38+ org.opencontainers.image.vendor=HyperProg
39+
40+ - name : Set up Docker Buildx
41+ uses : docker/setup-buildx-action@v2
42+
43+ - name : Build and push
44+ uses : docker/build-push-action@v4
45+ with :
46+ context : .
47+ file : Dockerfile
48+ push : true
49+ platforms : |
50+ linux/amd64,
51+ linux/arm/v6,
52+ linux/arm/v7,
53+ linux/arm64/v8
54+
55+ tags : ${{ steps.meta.outputs.tags }}
56+ labels : ${{ steps.meta.outputs.labels }}
You can’t perform that action at this time.
0 commit comments