Skip to content

Add GitHub workflow for building Docker image #280

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 15, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Remove Docker image scanning for now
  • Loading branch information
joschi committed Nov 15, 2021
commit fec33ca6fa7a2f5da2f5b4efb7ba8ef1f9db48c1
19 changes: 5 additions & 14 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,31 +7,22 @@ jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout SCM
uses: actions/checkout@v2.4.0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
- name: Set output
- name: Set Git tag in output
id: vars
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/}
- name: Build Docker image
uses: docker/build-push-action@v2
with:
load: true
push: false
tags: openapitools/openapi-diff:${{ steps.vars.outputs.tag }}
- name: Scan image
uses: anchore/scan-action@v3
with:
image: openapitools/openapi-diff:${{ steps.vars.outputs.tag }}
fail-build: false
- name: Build and push
id: docker_build
- name: Build & Push Docker image
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: |
openapitools/openapi-diff:${{ steps.vars.outputs.tag }}
Expand Down