File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # author: 0-8-4
2+ # date: 24-11-2022 18:34 AEDT
3+ #
4+ # This script is used to automatically build docker image and
5+ # push to DockerHub when every new release is published
6+
7+ name : Docker Image CI
8+
9+ on :
10+ release :
11+ types : [published]
12+ workflow_dispatch :
13+
14+ env :
15+ DOCKERHUB_REPO : o1si/miui-auto-tasks
16+
17+ jobs :
18+ build :
19+ runs-on : ubuntu-latest
20+ steps :
21+ -
22+ name : Set up QEMU
23+ uses : docker/setup-qemu-action@v2
24+
25+ -
26+ name : Set up Docker Buildx
27+ uses : docker/setup-buildx-action@v2
28+
29+ -
30+ name : Login to Docker Hub
31+ uses : docker/login-action@v2
32+ with :
33+ username : ${{ secret.DOCKERHUB_USERNAME }}
34+ password : ${{ secret.DOCKERHUB_TOKEN }}
35+
36+ -
37+ name : Build and push
38+ uses : docker/build-push-action@v3
39+ with :
40+ push : true
41+ platforms : |
42+ linux/amd64
43+ linux/arm64
44+ tags : |
45+ ${{ env.DOCKERHUB_REPO }}:latest
46+ ${{ env.DOCKERHUB_REPO }}:${{ github.event.release.tag_name }}
47+
You can’t perform that action at this time.
0 commit comments