File tree Expand file tree Collapse file tree 1 file changed +54
-0
lines changed
Expand file tree Collapse file tree 1 file changed +54
-0
lines changed Original file line number Diff line number Diff line change 1+ # This workflow will upload Docker image when a release is created
2+ # For more information see: https://github.com/marketplace/actions/docker-build-push-action
3+
4+ name : Publish docker image (manual)
5+
6+ on :
7+ workflow_dispatch :
8+ inputs :
9+ version :
10+ required : true
11+ description : Version to build
12+ tags :
13+ required : true
14+ description : Tags to publish
15+ push :
16+ type : boolean
17+ description : Push to docker hub
18+
19+ jobs :
20+ docker :
21+ runs-on : ubuntu-latest
22+ steps :
23+ - uses : actions/checkout@v2
24+
25+ - name : Docker meta
26+ id : docker_meta
27+ uses : crazy-max/ghaction-docker-meta@v1
28+ with :
29+ images : |
30+ pythonopenapi/openapi-spec-validator
31+ tags : |
32+ type=semver,pattern=${{ github.event.inputs.version }}
33+
34+ - name : Set up QEMU
35+ uses : docker/setup-qemu-action@v1
36+
37+ - name : Set up Docker Buildx
38+ uses : docker/setup-buildx-action@v1
39+
40+ - name : Login to DockerHub
41+ if : github.event.inputs.push
42+ uses : docker/login-action@v1
43+ with :
44+ username : ${{ secrets.DOCKERHUB_USERNAME }}
45+ password : ${{ secrets.DOCKERHUB_TOKEN }}
46+
47+ - name : Build and push
48+ uses : docker/build-push-action@v2
49+ with :
50+ context : .
51+ platforms : linux/amd64,linux/arm64
52+ push : ${{ github.event.inputs.push }}
53+ tags : ${{ github.event.inputs.tags }}
54+ labels : ${{ github.event.inputs.version }}
You can’t perform that action at this time.
0 commit comments