File tree Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Expand file tree Collapse file tree 1 file changed +41
-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
5+
6+ on :
7+ workflow_dispatch :
8+ release :
9+ types :
10+ - created
11+
12+ jobs :
13+ docker :
14+ runs-on : ubuntu-latest
15+ steps :
16+ - uses : actions/checkout@v2
17+ - name : Docker meta
18+ id : docker_meta
19+ uses : crazy-max/ghaction-docker-meta@v1
20+ with :
21+ images : |
22+ p1c2u/openapi-spec-validator
23+ tag-semver : |
24+ {{version}}
25+ - name : Set up QEMU
26+ uses : docker/setup-qemu-action@v1
27+ - name : Set up Docker Buildx
28+ uses : docker/setup-buildx-action@v1
29+ - name : Login to DockerHub
30+ if : github.event_name != 'pull_request'
31+ uses : docker/login-action@v1
32+ with :
33+ username : ${{ secrets.DOCKERHUB_USERNAME }}
34+ password : ${{ secrets.DOCKERHUB_TOKEN }}
35+ - name : Build and push
36+ uses : docker/build-push-action@v2
37+ with :
38+ context : .
39+ push : ${{ github.event_name != 'pull_request' }}
40+ tags : ${{ steps.docker_meta.outputs.tags }}
41+ labels : ${{ steps.docker_meta.outputs.labels }}
You can’t perform that action at this time.
0 commit comments