Skip to content

Commit 6ff3294

Browse files
authored
Add GitHub workflow for building Docker image (#280)
1 parent 4a91cae commit 6ff3294

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

.github/workflows/docker.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Docker image
2+
on:
3+
push:
4+
tags:
5+
- '*'
6+
jobs:
7+
docker:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout SCM
11+
uses: actions/checkout@v2.4.0
12+
- name: Set up Docker Buildx
13+
uses: docker/setup-buildx-action@v1
14+
- name: Login to DockerHub
15+
uses: docker/login-action@v1
16+
with:
17+
username: ${{ secrets.DOCKER_HUB_USERNAME }}
18+
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
19+
- name: Set Git tag in output
20+
id: vars
21+
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/}
22+
- name: Build & Push Docker image
23+
uses: docker/build-push-action@v2
24+
with:
25+
context: .
26+
push: true
27+
tags: |
28+
openapitools/openapi-diff:${{ steps.vars.outputs.tag }}
29+
openapitools/openapi-diff:latest

0 commit comments

Comments
 (0)