-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #142 from viccuad/main
fix: Don't compare version on CI for rust policies
- Loading branch information
Showing
14 changed files
with
71 additions
and
57 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 |
---|---|---|
|
@@ -19,7 +19,7 @@ jobs: | |
NODE_VERSION: 14 | ||
steps: | ||
- name: Install dependencies | ||
uses: kubewarden/github-actions/[email protected].0 | ||
uses: kubewarden/github-actions/[email protected].1 | ||
- uses: actions/checkout@v4 | ||
with: | ||
# until https://github.com/actions/checkout/pull/579 is released | ||
|
@@ -44,7 +44,7 @@ jobs: | |
- name: Check that artifacthub-pkg.yml is up-to-date | ||
# skip when releasing :latest from main, versions will not match | ||
if: startsWith(github.ref, 'refs/tags/v') && inputs.artifacthub | ||
uses: kubewarden/github-actions/[email protected].0 | ||
uses: kubewarden/github-actions/[email protected].1 | ||
with: | ||
version: ${{ steps.calculate-version.outputs.version }} | ||
- name: Setup node | ||
|
@@ -67,7 +67,7 @@ jobs: | |
run: | | ||
make e2e-tests | ||
- name: Release | ||
uses: kubewarden/github-actions/[email protected].0 | ||
uses: kubewarden/github-actions/[email protected].1 | ||
with: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
oci-target: ${{ inputs.oci-target }} | ||
|
@@ -83,4 +83,4 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- name: Push artifacthub files to artifacthub branch | ||
uses: kubewarden/github-actions/[email protected].0 | ||
uses: kubewarden/github-actions/[email protected].1 |
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 |
---|---|---|
|
@@ -17,7 +17,7 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- name: Install dependencies | ||
uses: kubewarden/github-actions/[email protected].0 | ||
uses: kubewarden/github-actions/[email protected].1 | ||
- uses: actions/checkout@v4 | ||
with: | ||
# until https://github.com/actions/checkout/pull/579 is released | ||
|
@@ -42,16 +42,16 @@ jobs: | |
- name: Check that artifacthub-pkg.yml is up-to-date | ||
# skip when releasing :latest from main, versions will not match | ||
if: startsWith(github.ref, 'refs/tags/v') && inputs.artifacthub | ||
uses: kubewarden/github-actions/[email protected].0 | ||
uses: kubewarden/github-actions/[email protected].1 | ||
with: | ||
version: ${{ steps.calculate-version.outputs.version }} | ||
- name: Build and annotate policy | ||
uses: kubewarden/github-actions/[email protected].0 | ||
uses: kubewarden/github-actions/[email protected].1 | ||
- name: Run e2e tests | ||
run: | | ||
make e2e-tests | ||
- name: Release | ||
uses: kubewarden/github-actions/[email protected].0 | ||
uses: kubewarden/github-actions/[email protected].1 | ||
with: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
oci-target: ${{ inputs.oci-target }} | ||
|
@@ -67,4 +67,4 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- name: Push artifacthub files to artifacthub branch | ||
uses: kubewarden/github-actions/[email protected].0 | ||
uses: kubewarden/github-actions/[email protected].1 |
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 |
---|---|---|
|
@@ -17,7 +17,7 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- name: Install dependencies | ||
uses: kubewarden/github-actions/[email protected].0 | ||
uses: kubewarden/github-actions/[email protected].1 | ||
- uses: actions/checkout@v4 | ||
with: | ||
# until https://github.com/actions/checkout/pull/579 is released | ||
|
@@ -42,16 +42,16 @@ jobs: | |
- name: Check that artifacthub-pkg.yml is up-to-date | ||
# skip when releasing :latest from main, versions will not match | ||
if: startsWith(github.ref, 'refs/tags/v') && inputs.artifacthub | ||
uses: kubewarden/github-actions/[email protected].0 | ||
uses: kubewarden/github-actions/[email protected].1 | ||
with: | ||
version: ${{ steps.calculate-version.outputs.version }} | ||
- name: Build and annotate policy | ||
uses: kubewarden/github-actions/[email protected].0 | ||
uses: kubewarden/github-actions/[email protected].1 | ||
- name: Run e2e tests | ||
run: | | ||
make e2e-tests | ||
- name: Release | ||
uses: kubewarden/github-actions/[email protected].0 | ||
uses: kubewarden/github-actions/[email protected].1 | ||
with: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
oci-target: ${{ inputs.oci-target }} | ||
|
@@ -67,4 +67,4 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- name: Push artifacthub files to artifacthub branch | ||
uses: kubewarden/github-actions/[email protected].0 | ||
uses: kubewarden/github-actions/[email protected].1 |
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 |
---|---|---|
|
@@ -29,7 +29,7 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- name: Install dependencies | ||
uses: kubewarden/github-actions/[email protected].0 | ||
uses: kubewarden/github-actions/[email protected].1 | ||
- uses: actions/checkout@v4 | ||
with: | ||
# until https://github.com/actions/checkout/pull/579 is released | ||
|
@@ -60,12 +60,12 @@ jobs: | |
- name: Check that artifacthub-pkg.yml is up-to-date | ||
# skip when releasing :latest from main, versions will not match | ||
if: ${{ inputs.artifacthub && ( ! startsWith(github.ref, 'refs/heads/') ) }} | ||
uses: kubewarden/github-actions/[email protected].0 | ||
uses: kubewarden/github-actions/[email protected].1 | ||
with: | ||
version: ${{ steps.calculate-version.outputs.version }} | ||
policy-working-dir: ${{ inputs.policy-working-dir }} | ||
- name: Install opa | ||
uses: kubewarden/github-actions/[email protected].0 | ||
uses: kubewarden/github-actions/[email protected].1 | ||
- uses: actions/checkout@v4 | ||
- name: Build policy | ||
working-directory: ${{ inputs.policy-working-dir }} | ||
|
@@ -83,7 +83,7 @@ jobs: | |
run: | | ||
make e2e-tests | ||
- name: Release | ||
uses: kubewarden/github-actions/[email protected].0 | ||
uses: kubewarden/github-actions/[email protected].1 | ||
with: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
oci-target: ${{ inputs.oci-target }} | ||
|
@@ -100,6 +100,6 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- name: Push artifacthub files to artifacthub branch | ||
uses: kubewarden/github-actions/[email protected].0 | ||
uses: kubewarden/github-actions/[email protected].1 | ||
with: | ||
policy-working-dir: ${{ inputs.policy-working-dir }} |
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 |
---|---|---|
|
@@ -17,7 +17,7 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- name: Install dependencies | ||
uses: kubewarden/github-actions/[email protected].0 | ||
uses: kubewarden/github-actions/[email protected].1 | ||
- uses: actions/checkout@v4 | ||
with: | ||
# until https://github.com/actions/checkout/pull/579 is released | ||
|
@@ -42,16 +42,16 @@ jobs: | |
- name: Check that artifacthub-pkg.yml is up-to-date | ||
# skip when releasing :latest from main, versions will not match | ||
if: startsWith(github.ref, 'refs/tags/v') && inputs.artifacthub | ||
uses: kubewarden/github-actions/[email protected].0 | ||
uses: kubewarden/github-actions/[email protected].1 | ||
with: | ||
version: ${{ steps.calculate-version.outputs.version }} | ||
- name: Build and annotate policy | ||
uses: kubewarden/github-actions/[email protected].0 | ||
uses: kubewarden/github-actions/[email protected].1 | ||
- name: Run e2e tests | ||
run: | | ||
make e2e-tests | ||
- name: Release | ||
uses: kubewarden/github-actions/[email protected].0 | ||
uses: kubewarden/github-actions/[email protected].1 | ||
with: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
oci-target: ${{ inputs.oci-target }} | ||
|
@@ -67,4 +67,4 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- name: Push artifacthub files to artifacthub branch | ||
uses: kubewarden/github-actions/[email protected].0 | ||
uses: kubewarden/github-actions/[email protected].1 |
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 |
---|---|---|
|
@@ -17,7 +17,7 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- name: Install dependencies | ||
uses: kubewarden/github-actions/[email protected].0 | ||
uses: kubewarden/github-actions/[email protected].1 | ||
- uses: actions/checkout@v4 | ||
with: | ||
# until https://github.com/actions/checkout/pull/579 is released | ||
|
@@ -42,7 +42,7 @@ jobs: | |
- name: Check that artifacthub-pkg.yml is up-to-date | ||
# skip when releasing :latest from main, versions will not match | ||
if: startsWith(github.ref, 'refs/tags/v') && inputs.artifacthub | ||
uses: kubewarden/github-actions/[email protected].0 | ||
uses: kubewarden/github-actions/[email protected].1 | ||
with: | ||
version: ${{ steps.calculate-version.outputs.version }} | ||
- name: install wasm-strip | ||
|
@@ -68,7 +68,7 @@ jobs: | |
run: | | ||
make e2e-tests | ||
- name: Release | ||
uses: kubewarden/github-actions/[email protected].0 | ||
uses: kubewarden/github-actions/[email protected].1 | ||
with: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
oci-target: ${{ inputs.oci-target }} | ||
|
@@ -84,4 +84,4 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- name: Push artifacthub files to artifacthub branch | ||
uses: kubewarden/github-actions/[email protected].0 | ||
uses: kubewarden/github-actions/[email protected].1 |
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 |
---|---|---|
|
@@ -35,7 +35,7 @@ jobs: | |
# until https://github.com/actions/checkout/pull/579 is released | ||
fetch-depth: 0 | ||
- name: Install kwctl | ||
uses: kubewarden/github-actions/[email protected].0 | ||
uses: kubewarden/github-actions/[email protected].1 | ||
- id: calculate-version | ||
shell: bash | ||
run: | | ||
|
@@ -54,7 +54,7 @@ jobs: | |
fi | ||
echo "version=$version" >> $GITHUB_OUTPUT | ||
- name: Check that artifacthub-pkg.yml is up-to-date | ||
uses: kubewarden/github-actions/[email protected].0 | ||
uses: kubewarden/github-actions/[email protected].1 | ||
with: | ||
version: ${{ steps.calculate-version.outputs.version }} | ||
check_version: false # must match a git tag that hasn't been created yet, so let's ignore until then |
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 |
---|---|---|
|
@@ -29,11 +29,11 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install dependencies | ||
uses: kubewarden/github-actions/[email protected].0 | ||
uses: kubewarden/github-actions/[email protected].1 | ||
- name: Build and annotate policy | ||
with: | ||
generate-sbom: false | ||
uses: kubewarden/github-actions/[email protected].0 | ||
uses: kubewarden/github-actions/[email protected].1 | ||
- name: Run e2e tests | ||
run: make e2e-tests | ||
|
||
|
@@ -58,7 +58,7 @@ jobs: | |
# until https://github.com/actions/checkout/pull/579 is released | ||
fetch-depth: 0 | ||
- name: Install kwctl | ||
uses: kubewarden/github-actions/[email protected].0 | ||
uses: kubewarden/github-actions/[email protected].1 | ||
- id: calculate-version | ||
shell: bash | ||
run: | | ||
|
@@ -77,7 +77,7 @@ jobs: | |
fi | ||
echo "version=$version" >> $GITHUB_OUTPUT | ||
- name: Check that artifacthub-pkg.yml is up-to-date | ||
uses: kubewarden/github-actions/[email protected].0 | ||
uses: kubewarden/github-actions/[email protected].1 | ||
with: | ||
version: ${{ steps.calculate-version.outputs.version }} | ||
check_version: false # must match a git tag that hasn't been created yet, so let's ignore until then |
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 |
---|---|---|
|
@@ -29,11 +29,11 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install dependencies | ||
uses: kubewarden/github-actions/[email protected].0 | ||
uses: kubewarden/github-actions/[email protected].1 | ||
- name: Build and annotate policy | ||
with: | ||
generate-sbom: false | ||
uses: kubewarden/github-actions/[email protected].0 | ||
uses: kubewarden/github-actions/[email protected].1 | ||
- name: Run e2e tests | ||
run: make e2e-tests | ||
|
||
|
@@ -58,7 +58,7 @@ jobs: | |
# until https://github.com/actions/checkout/pull/579 is released | ||
fetch-depth: 0 | ||
- name: Install kwctl | ||
uses: kubewarden/github-actions/[email protected].0 | ||
uses: kubewarden/github-actions/[email protected].1 | ||
- id: calculate-version | ||
shell: bash | ||
run: | | ||
|
@@ -77,7 +77,7 @@ jobs: | |
fi | ||
echo "version=$version" >> $GITHUB_OUTPUT | ||
- name: Check that artifacthub-pkg.yml is up-to-date | ||
uses: kubewarden/github-actions/[email protected].0 | ||
uses: kubewarden/github-actions/[email protected].1 | ||
with: | ||
version: ${{ steps.calculate-version.outputs.version }} | ||
check_version: false # must match a git tag that hasn't been created yet, so let's ignore until then |
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 |
---|---|---|
|
@@ -28,7 +28,7 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install opa | ||
uses: kubewarden/github-actions/[email protected].0 | ||
uses: kubewarden/github-actions/[email protected].1 | ||
- name: Run unit tests | ||
working-directory: ${{ inputs.policy-working-dir }} | ||
run: make test | ||
|
@@ -42,7 +42,7 @@ jobs: | |
# until https://github.com/actions/checkout/pull/579 is released | ||
fetch-depth: 0 | ||
- name: Install kwctl | ||
uses: kubewarden/github-actions/[email protected].0 | ||
uses: kubewarden/github-actions/[email protected].1 | ||
- id: calculate-version | ||
shell: bash | ||
run: | | ||
|
@@ -69,7 +69,7 @@ jobs: | |
- name: Check that artifacthub-pkg.yml is up-to-date | ||
# only makes sense to run this check if artifacthub-pkg.yml has been | ||
# updated for an upcoming release. | ||
uses: kubewarden/github-actions/[email protected].0 | ||
uses: kubewarden/github-actions/[email protected].1 | ||
with: | ||
version: ${{ steps.calculate-version.outputs.version }} | ||
check_version: false # must match a git tag that hasn't been created yet, so let's ignore until then | ||
|
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 |
---|---|---|
|
@@ -35,15 +35,29 @@ jobs: | |
# until https://github.com/actions/checkout/pull/579 is released | ||
fetch-depth: 0 | ||
- name: Install kwctl | ||
uses: kubewarden/github-actions/[email protected].0 | ||
uses: kubewarden/github-actions/[email protected].1 | ||
- id: calculate-version | ||
if: ${{ startsWith(github.ref, 'refs/tags/v') }} | ||
run: echo "version=$(sed -n 's,^version = \"\(.*\)\",\1,p' Cargo.toml)" >> $GITHUB_OUTPUT | ||
shell: bash | ||
run: | | ||
if [ ${{ startsWith(github.ref, 'refs/tags/v') }} == true ]; then | ||
# Triggered via normal tag. | ||
# Use the latest tag (e.g: v0.1.11) without the `v` prefix. | ||
version=$(git describe --tags --abbrev=0 | cut -c2-) | ||
else | ||
# Triggered via branch, version is not checked in artifacthub. | ||
# Still, `make artifacthub-pkg.yml` needs a proper semver string. | ||
# | ||
# Use most recent tag with the number of additional commits on top | ||
# of the tagged object & last commit hash (eg. v0.1.11-3-g8a36322), | ||
# without the `v` prefix. | ||
version=$(git describe --tags | cut -c2-) | ||
fi | ||
echo "version=$version" >> $GITHUB_OUTPUT | ||
- name: Check that artifacthub-pkg.yml is up-to-date | ||
uses: kubewarden/github-actions/[email protected].0 | ||
uses: kubewarden/github-actions/[email protected].1 | ||
with: | ||
version: ${{ steps.calculate-version.outputs.version }} | ||
check_version: false # must match a git tag that hasn't been created yet, so let's ignore until then | ||
check: | ||
name: Cargo check | ||
runs-on: ubuntu-latest | ||
|
@@ -76,11 +90,11 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install dependencies | ||
uses: kubewarden/github-actions/[email protected].0 | ||
uses: kubewarden/github-actions/[email protected].1 | ||
- name: Build and annotate policy | ||
with: | ||
generate-sbom: false | ||
uses: kubewarden/github-actions/[email protected].0 | ||
uses: kubewarden/github-actions/[email protected].1 | ||
- name: Run e2e tests | ||
run: | | ||
make e2e-tests | ||
|
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 |
---|---|---|
|
@@ -29,7 +29,7 @@ jobs: | |
# until https://github.com/actions/checkout/pull/579 is released | ||
fetch-depth: 0 | ||
- name: Install kwctl | ||
uses: kubewarden/github-actions/[email protected].0 | ||
uses: kubewarden/github-actions/[email protected].1 | ||
- id: calculate-version | ||
shell: bash | ||
run: | | ||
|
@@ -48,7 +48,7 @@ jobs: | |
fi | ||
echo "version=$version" >> $GITHUB_OUTPUT | ||
- name: Check that artifacthub-pkg.yml is up-to-date | ||
uses: kubewarden/github-actions/[email protected].0 | ||
uses: kubewarden/github-actions/[email protected].1 | ||
with: | ||
version: ${{ steps.calculate-version.outputs.version }} | ||
check_version: false # must match a git tag that hasn't been created yet, so let's ignore until then |
Oops, something went wrong.