-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(deps): update tinygo version to v0.32.0.
Updates the tinygo version used in the policy to the latest version with the patched required by this policy applied. The version in use now is v0.32.0. Signed-off-by: José Guilherme Vanz <[email protected]>
- Loading branch information
Showing
6 changed files
with
11 additions
and
187 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 |
---|---|---|
|
@@ -5,12 +5,12 @@ on: | |
tags: | ||
- "v*" | ||
|
||
name: Release policy - test | ||
name: Release policy | ||
|
||
jobs: | ||
test: | ||
name: run tests and linters | ||
uses: ./.github/workflows/reusable-test-policy-go.yml | ||
uses: kubewarden/github-actions/.github/workflows/reusable-test-policy-go.yml@v3.3.0 | ||
|
||
release: | ||
needs: test | ||
|
@@ -22,86 +22,6 @@ jobs: | |
# Required by cosign keyless signing | ||
id-token: write | ||
|
||
# TODO: go back to using the reusable workflow once we don't need the special tinygo build | ||
#uses: kubewarden/github-actions/.github/workflows/[email protected] | ||
#with: | ||
# oci-target: ghcr.io/${{ github.repository_owner }}/policies/container-resources | ||
|
||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Install dependencies | ||
uses: kubewarden/github-actions/[email protected] | ||
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
with: | ||
# until https://github.com/actions/checkout/pull/579 is released | ||
fetch-depth: 0 | ||
- name: Install patched tinygo | ||
shell: bash | ||
run: | | ||
wget https://github.com/tinygo-org/tinygo/releases/download/v0.31.1/tinygo_0.31.1_amd64.deb | ||
sudo dpkg -i tinygo_0.31.1_amd64.deb | ||
wget https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-16/libclang_rt.builtins-wasm32-wasi-16.0.tar.gz | ||
tar xvf libclang_rt.builtins-wasm32-wasi-16.0.tar.gz | ||
sudo cp lib/wasi/libclang_rt.builtins-wasm32.a /usr/local/lib/tinygo/lib/wasi-libc/sysroot/lib/wasm32-wasi/ | ||
sudo cp wasi-gh-action.json /usr/local/lib/tinygo/targets/wasi.json | ||
- id: calculate-version | ||
if: ${{ inputs.artifacthub }} | ||
# obtain latest tag. Here it must be the current release tag | ||
run: echo "version=$(git describe --tags --abbrev=0 | cut -c2-)" >> $GITHUB_OUTPUT | ||
shell: bash | ||
- name: Check that artifacthub-pkg.yml is up-to-date | ||
if: ${{ inputs.artifacthub }} | ||
uses: kubewarden/github-actions/[email protected] | ||
with: | ||
version: ${{ steps.calculate-version.outputs.version }} | ||
- name: Build policy | ||
run: | | ||
tinygo build -o policy.wasm -target=wasi -no-debug . | ||
- name: Generate the SBOM files | ||
shell: bash | ||
run: | | ||
spdx-sbom-generator -f json | ||
# SBOM files should have "sbom" in the name due the CLO monitor | ||
# https://clomonitor.io/docs/topics/checks/#software-bill-of-materials-sbom | ||
mv bom-go-mod.json policy-sbom.spdx.json | ||
- name: Annotate Wasm module | ||
shell: bash | ||
run: | | ||
make annotated-policy.wasm | ||
- name: Sign BOM file | ||
shell: bash | ||
run: | | ||
cosign sign-blob --yes --output-certificate policy-sbom.spdx.cert \ | ||
--output-signature policy-sbom.spdx.sig \ | ||
policy-sbom.spdx.json | ||
- name: Upload policy SBOM files | ||
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 | ||
with: | ||
name: policy-sbom | ||
path: | | ||
policy-sbom.spdx.json | ||
policy-sbom.spdx.cert | ||
policy-sbom.spdx.sig | ||
- name: Run e2e tests | ||
run: | | ||
make e2e-tests | ||
- name: Release | ||
uses: kubewarden/github-actions/[email protected] | ||
with: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
oci-target: ghcr.io/${{ github.repository_owner }}/policies/container-resources | ||
|
||
push-artifacthub: | ||
# skip when releasing :latest from main, versions will not match | ||
if: startsWith(github.ref, 'refs/tags/v') | ||
needs: release | ||
permissions: | ||
# Give the default GITHUB_TOKEN write permission to commit and push the | ||
# added or changed files to the repository. | ||
contents: write | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
name: Push artifacthub files to artifacthub branch | ||
uses: kubewarden/github-actions/[email protected] | ||
uses: kubewarden/github-actions/.github/workflows/[email protected] | ||
with: | ||
oci-target: ghcr.io/${{ github.repository_owner }}/policies/container-resources |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
module github.com/kubewarden/container-resources-policy | ||
|
||
go 1.22 | ||
go 1.22.0 | ||
|
||
toolchain go1.22.4 | ||
|
||
|
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