🌱 feat: Add container check CI job #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Container Check | |
on: | |
push: | |
paths-ignore: | |
- '**/*.md' | |
pull_request: | |
paths-ignore: | |
- '**/*.md' | |
jobs: | |
container-check: | |
runs-on: ubuntu-latest | |
if: (github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository) | |
steps: | |
- name: Clone the code | |
uses: actions/checkout@v4 | |
- name: Build and push container image | |
working-directory: testdata/project-v4 | |
run: IMG=ttl.sh/kubebuilder-container-check-$(git rev-parse --short HEAD):5m make docker-build docker-push | |
- name: Build and push container image with buildx | |
working-directory: testdata/project-v4 | |
run: IMG=ttl.sh/kubebuilder-container-buildx-check-$(git rev-parse --short HEAD):5m make docker-buildx | |
- name: Container file linter | |
uses: hadolint/[email protected] | |
with: | |
dockerfile: testdata/project-v4/Dockerfile |