From 55c8e67cff146b5ecbec5e56d3e411d20cfd1ad7 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 17 Sep 2024 06:45:33 +0000 Subject: [PATCH 1/4] chore(deps): update kubewarden/github-actions action to v3.3.5 --- .github/workflows/release.yml | 4 ++-- .github/workflows/test.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 597b0a9..c58daa9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,7 +21,7 @@ jobs: steps: - name: Install dependencies - uses: kubewarden/github-actions/policy-gh-action-dependencies@v3.3.4 + uses: kubewarden/github-actions/policy-gh-action-dependencies@v3.3.5 - uses: actions/checkout@v4 with: # until https://github.com/actions/checkout/pull/579 is released @@ -39,7 +39,7 @@ jobs: run: | make e2e-tests - name: Release - uses: kubewarden/github-actions/policy-release@v3.3.4 + uses: kubewarden/github-actions/policy-release@v3.3.5 with: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} oci-target: ghcr.io/${{ github.repository_owner }}/policies/kyverno-dsl diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f7ca953..92cbc71 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -6,7 +6,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Install dependencies - uses: kubewarden/github-actions/policy-gh-action-dependencies@v3.3.4 + uses: kubewarden/github-actions/policy-gh-action-dependencies@v3.3.5 - uses: actions/checkout@v4 with: # until https://github.com/actions/checkout/pull/579 is released From 4e021d4f5fba41cf60e550c14b0855dd25f8eba5 Mon Sep 17 00:00:00 2001 From: Flavio Castelli Date: Tue, 17 Sep 2024 11:32:01 +0200 Subject: [PATCH 2/4] test: use centralized GH actions Signed-off-by: Flavio Castelli --- .github/workflows/release.yml | 34 ++++++++-------------------------- .github/workflows/test.yml | 21 +-------------------- 2 files changed, 9 insertions(+), 46 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c58daa9..4e76411 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,9 +8,12 @@ on: name: Release policy jobs: - release: - runs-on: ubuntu-latest + test: + name: run tests and linters + uses: kubewarden/github-actions/.github/workflows/reusable-test-policy-go-wasi.yml@v3.3.5 + release: + needs: test permissions: # Required to create GH releases contents: write @@ -19,27 +22,6 @@ jobs: # Required by cosign keyless signing id-token: write - steps: - - name: Install dependencies - uses: kubewarden/github-actions/policy-gh-action-dependencies@v3.3.5 - - uses: actions/checkout@v4 - with: - # until https://github.com/actions/checkout/pull/579 is released - fetch-depth: 0 - - uses: actions/setup-go@v5 - with: - go-version: "1.21.1" - - name: Build - run: | - make policy.wasm - - name: Annotate - run: | - make annotated-policy.wasm - - name: Run e2e tests - run: | - make e2e-tests - - name: Release - uses: kubewarden/github-actions/policy-release@v3.3.5 - with: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - oci-target: ghcr.io/${{ github.repository_owner }}/policies/kyverno-dsl + uses: kubewarden/github-actions/.github/workflows/reusable-release-policy-go-wasi.yml@v3.3.5 + with: + oci-target: ghcr.io/${{ github.repository_owner }}/policies/kyverno-dsl diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 92cbc71..7c0ef0a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -3,23 +3,4 @@ name: Continuous integration jobs: test: name: run tests and linters - runs-on: ubuntu-latest - steps: - - name: Install dependencies - uses: kubewarden/github-actions/policy-gh-action-dependencies@v3.3.5 - - uses: actions/checkout@v4 - with: - # until https://github.com/actions/checkout/pull/579 is released - fetch-depth: 0 - - uses: actions/setup-go@v5 - with: - go-version: "1.21.1" - - name: Build - run: | - make policy.wasm - - name: Annotate - run: | - make annotated-policy.wasm - - name: Run e2e tests - run: | - make e2e-tests + uses: kubewarden/github-actions/.github/workflows/reusable-test-policy-go-wasi.yml@v3.3.5 From 7e0240988431a5a8188f7b7d5a1e596f1fcbe827 Mon Sep 17 00:00:00 2001 From: Flavio Castelli Date: Tue, 17 Sep 2024 11:34:09 +0200 Subject: [PATCH 3/4] test: add Makefile target required by centralized GH actions Signed-off-by: Flavio Castelli --- Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Makefile b/Makefile index 2115576..b0830ac 100644 --- a/Makefile +++ b/Makefile @@ -31,6 +31,9 @@ clean: go clean rm -f policy.wasm annotated-policy.wasm artifacthub-pkg.yml +test: + echo "No tests implemented - refer to e2e-tests" + .PHONY: e2e-tests e2e-tests: annotated-policy.wasm bats e2e.bats From 3fa9e64c6a86f21a482b7f0f05b8fc1fc470b724 Mon Sep 17 00:00:00 2001 From: Flavio Castelli Date: Tue, 17 Sep 2024 11:36:09 +0200 Subject: [PATCH 4/4] test: disable artifacthub checks The policy is not on ArtifactHub yet Signed-off-by: Flavio Castelli --- .github/workflows/release.yml | 3 +++ .github/workflows/test.yml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4e76411..2903e64 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,6 +11,8 @@ jobs: test: name: run tests and linters uses: kubewarden/github-actions/.github/workflows/reusable-test-policy-go-wasi.yml@v3.3.5 + with: + artifacthub: false release: needs: test @@ -25,3 +27,4 @@ jobs: uses: kubewarden/github-actions/.github/workflows/reusable-release-policy-go-wasi.yml@v3.3.5 with: oci-target: ghcr.io/${{ github.repository_owner }}/policies/kyverno-dsl + artifacthub: false diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7c0ef0a..bcecd8e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -4,3 +4,5 @@ jobs: test: name: run tests and linters uses: kubewarden/github-actions/.github/workflows/reusable-test-policy-go-wasi.yml@v3.3.5 + with: + artifacthub: false