Skip to content

Commit

Permalink
test: use centralized GH actions
Browse files Browse the repository at this point in the history
Signed-off-by: Flavio Castelli <fcastelli@suse.com>
  • Loading branch information
flavio committed Sep 17, 2024
1 parent 55c8e67 commit 4e021d4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 46 deletions.
34 changes: 8 additions & 26 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
21 changes: 1 addition & 20 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 4e021d4

Please sign in to comment.