File tree Expand file tree Collapse file tree 1 file changed +52
-0
lines changed Expand file tree Collapse file tree 1 file changed +52
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Publish Docker image
2+
3+ on :
4+ release :
5+ types : [published]
6+
7+ jobs :
8+ push_to_registries :
9+ name : Push Docker image to multiple registries
10+ runs-on : ubuntu-latest
11+ permissions :
12+ packages : write
13+ contents : read
14+ steps :
15+ - name : Check out the repo
16+ uses : actions/checkout@v3
17+
18+ - name : Set up QEMU
19+ uses : docker/setup-qemu-action@v2
20+
21+ - name : Set up Docker Buildx
22+ uses : docker/setup-buildx-action@v2
23+
24+ - name : Log in to Docker Hub
25+ uses : docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
26+ with :
27+ username : ${{ secrets.DOCKER_USERNAME }}
28+ password : ${{ secrets.DOCKER_PASSWORD }}
29+
30+ - name : Log in to the Container registry
31+ uses : docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
32+ with :
33+ registry : ghcr.io
34+ username : ${{ github.actor }}
35+ password : ${{ secrets.GITHUB_TOKEN }}
36+
37+ - name : Extract metadata (tags, labels) for Docker
38+ id : meta
39+ uses : docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
40+ with :
41+ images : |
42+ resmoio/kubernetes-event-exporter
43+ ghcr.io/${{ github.repository }}
44+
45+ - name : Build and push Docker images
46+ uses : docker/build-push-action@v3
47+ with :
48+ context : .
49+ push : true
50+ platforms : linux/amd64,linux/arm64
51+ tags : ${{ steps.meta.outputs.tags }}
52+ labels : ${{ steps.meta.outputs.labels }}
You can’t perform that action at this time.
0 commit comments