File tree Expand file tree Collapse file tree 1 file changed +48
-0
lines changed
Expand file tree Collapse file tree 1 file changed +48
-0
lines changed Original file line number Diff line number Diff line change 1+ name : " Build and Push Docker Images"
2+
3+ on :
4+ release :
5+ types : [published]
6+ pull_request :
7+ branches : ["main"]
8+
9+ jobs :
10+ push_to_registry :
11+ name : Build and Push Docker Images
12+ runs-on : ubuntu-latest
13+ steps :
14+ - name : Checkout repo
15+ uses : actions/checkout@v2
16+
17+ - name : Set up QEMU for multi-arch builds
18+ uses : docker/setup-qemu-action@v1
19+
20+ - name : Set up Docker buildx for multi-arch builds
21+ uses : docker/setup-buildx-action@v1
22+
23+ - name : Docker meta
24+ id : meta
25+ uses : docker/metadata-action@v4
26+ with :
27+ images : |
28+ ${{ secrets.DOCKER_ORG }}/${{ github.event.repository.name }}
29+ tags : |
30+ type=ref,event=pr
31+ type=semver,pattern={{major}}
32+ type=semver,pattern={{major}}.{{minor}}
33+ type=semver,pattern={{version}}
34+
35+ - name : Login to Docker Hub
36+ uses : docker/login-action@v2
37+ with :
38+ username : ${{ secrets.DOCKER_USERNAME }}
39+ password : ${{ secrets.DOCKER_PASSWORD }}
40+
41+ - name : Build and push
42+ uses : docker/build-push-action@v3
43+ with :
44+ context : .
45+ platforms : linux/amd64,linux/arm64
46+ push : true
47+ tags : ${{ steps.meta.outputs.tags }}
48+ labels : ${{ steps.meta.outputs.labels }}
You can’t perform that action at this time.
0 commit comments