-
Notifications
You must be signed in to change notification settings - Fork 180
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move image-detector jobs to github workflow (#11980)
* Move image-detetcor jobs to github workflow * Fix github actions variable config
- Loading branch information
1 parent
07519c2
commit 3a6f49c
Showing
4 changed files
with
71 additions
and
72 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,56 @@ | ||
name: push-update-security-config | ||
|
||
on: | ||
schedule: | ||
- cron: 0 8 * * * | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- '**/*.md' | ||
- '**/*.yml' | ||
- '**/*.yaml' | ||
- '**/*.tf' | ||
- '**/*.tfvars' | ||
|
||
jobs: | ||
autobump: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
id-token: write # This is required for requesting the JWT token | ||
contents: read # This is required for actions/checkout | ||
concurrency: | ||
group: post-test-infra-image-detector-autobump | ||
cancel-in-progress: false | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Authenticate in GCP | ||
id: 'auth' | ||
uses: 'google-github-actions/auth@v2' | ||
with: | ||
project_id: ${{ vars.GCP_KYMA_PROJECT_PROJECT_ID }} | ||
workload_identity_provider: ${{ vars.GH_COM_KYMA_PROJECT_GCP_WORKLOAD_IDENTITY_FEDERATION_PROVIDER }} | ||
|
||
- name: Get kyma bot token from Secret Manager | ||
id: 'secrets' | ||
uses: 'google-github-actions/get-secretmanager-secrets@v2' | ||
with: | ||
secrets: |- | ||
kyma-autobump-token:${{ vars.GCP_KYMA_PROJECT_PROJECT_ID }}/${{ vars.KYMA_AUTOBUMP_BOT_GITHUB_SECRET_NAME }} | ||
- name: Store Github Token for autobumper | ||
run: echo ${{ steps.secrets.outputs.kyma-autobump-token }} > /etc/github/token | ||
|
||
- name: Find images to scan | ||
run: | | ||
docker run \ | ||
-v /etc/github/token:/etc/github/token:ro | ||
europe-docker.pkg.dev/kyma-project/prod/test-infra/ko/image-detector:v20240924-a3a85f88 \ | ||
--terraform-dir=configs/terraform \ | ||
--sec-scanner-config=sec-scanners-config.yaml \ | ||
--autobump-config=configs/autobump-config/test-infra-sec-config-autobump-config.yaml | ||
|
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
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
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