Skip to content
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

Create build-kh-storage-check.yml #4

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
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
32 changes: 32 additions & 0 deletions .github/workflows/build-kh-storage-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Build and Push Storage Check Latest
on:
push:
branches:
- master
- release/*
- docker-hub # for testing this build spec
paths:
- "cmd/stoage-chceck/**"
env:
IMAGE_NAME: kuberhealthy-storage-check
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: dockerfile sweep for best practices
uses: burdzwastaken/hadolint-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
HADOLINT_ACTION_DOCKERFILE_FOLDER: cmd/storage-check
HADOLINT_ACTION_COMMENT: false
- name: build container
run: docker build --file cmd/storage-check/Dockerfile --tag $IMAGE_NAME .
- name: Log into docker hub
run: echo "${{ secrets.DOCKER_TOKEN }}" | docker login -u integrii --password-stdin
- name: Push new latest image
run: |
docker tag $IMAGE_NAME chrishirsch/$IMAGE_NAME
docker push chrishirsch/$IMAGE_NAME
- name: scan docker image for vulnerabilities
run: curl -s https://ci-tools.anchore.io/inline_scan-v0.6.0 | bash -s -- -p -r kuberhealthy/$IMAGE_NAME:latest