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

created ngihtly-scan-test #129

Merged
merged 4 commits into from
Jul 3, 2024
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions .github/actions/setup-build-env/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: Setup build env

description: Clone repo, unshallow, setup go, cache and install tools.


inputs:
unshallow:
description: git unshallow
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/check-actions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,4 @@ jobs:
# See: https://github.com/slsa-framework/slsa-github-generator#referencing-slsa-builders-and-generators
allowlist: |
slsa-framework/slsa-github-generator
nirmata/reusable-workflows/.github/actions/image-scanning
60 changes: 60 additions & 0 deletions .github/workflows/nightly-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Nightly Scan
on:
schedule:
- cron: "*/5 * * *" # UTC

env:
REGISTRY: ghcr.io

jobs:
publish-scan-branch:
name: Publish
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
strategy:
fail-fast: false
matrix:
branch:
- main

steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
ref: ${{ matrix.branch }}

- name: Setup Go
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1
with:
go-version-file: go.mod
cache-dependency-path: go.sum

- name: Set Image name
run: |
echo IMAGE_NAME="nirmata/nightly-kyverno-${{ matrix.branch }}" >> $GITHUB_ENV

# - name: Log into registry ${{env.REGISTRY}}
# uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446 # v3.2.0
# with:
# registry: ${{env.REGISTRY}}
# username: ${{github.actor}}
# password: ${{secrets.GITHUB_TOKEN}}


- name: Build and Push
run: |
make ko-build-kyverno KO_DOCKER_REPO=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: image scanning
id: scan
uses: nirmata/reusable-workflows/.github/actions/image-scanning@cleanup
with:
pcc_url: ${{ secrets.PCC_URL }}
pcc_user: ${{ secrets.PCC_USER }}
pcc_pass: ${{ secrets.PCC_PASS }}
image_name: ${{env.REGISTRY}}/${{env.IMAGE_NAME}}
free-disk: 'true'


2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ build-all: build-kyverno-init build-kyverno build-cli build-cleanup-controller b
##############

LOCAL_PLATFORM := linux/$(GOARCH)
KO_REGISTRY := ko.local
KO_REGISTRY ?= ko.local
ifndef VERSION
KO_TAGS := $(GIT_SHA)
else ifeq ($(VERSION),main)
Expand Down
Loading