-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Mateus Oliveira <msouzaol@redhat.com>
- Loading branch information
1 parent
56e8901
commit d381bba
Showing
1 changed file
with
39 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
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: Setup Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: '~1.22' | ||
|
||
- name: Prepare project-v4 | ||
working-directory: testdata/project-v4 | ||
run: go mod tidy | ||
|
||
- 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/hadolint-action@v3.1.0 | ||
with: | ||
dockerfile: testdata/project-v4/Dockerfile |