Skip to content

Commit 484eba1

Browse files
authored
Merge pull request #15 from kubewarden/consume-gha-4.0.0
Consume kubewarden/github-actions v4.0.0
2 parents 4f3a7b6 + ac92bed commit 484eba1

5 files changed

Lines changed: 11 additions & 73 deletions

File tree

.github/workflows/release.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
11
on:
22
push:
33
branches:
4-
- main
4+
- main
55
tags:
6-
- 'v*'
6+
- "v*"
77

88
name: Release policy
99

1010
jobs:
11-
1211
test:
1312
name: run tests and linters
14-
uses: kubewarden/github-actions/.github/workflows/reusable-test-policy-swift.yml@v3.1.0
13+
uses: kubewarden/github-actions/.github/workflows/reusable-test-policy-swift.yml@72179510783eda8c052d17279881c3f7d02f968e # v4.0.0
1514

1615
release:
1716
needs: test
@@ -23,6 +22,6 @@ jobs:
2322
# Required by cosign keyless signing
2423
id-token: write
2524

26-
uses: kubewarden/github-actions/.github/workflows/reusable-release-policy-swift.yml@v3.1.0
25+
uses: kubewarden/github-actions/.github/workflows/reusable-release-policy-swift.yml@72179510783eda8c052d17279881c3f7d02f968e # v4.0.0
2726
with:
2827
oci-target: ghcr.io/${{ github.repository_owner }}/policies/policy-name # FIXME

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ name: Continuous integration
33
jobs:
44
test:
55
name: run tests and linters
6-
uses: kubewarden/github-actions/.github/workflows/reusable-test-policy-swift.yml@v3.1.0
6+
uses: kubewarden/github-actions/.github/workflows/reusable-test-policy-swift.yml@72179510783eda8c052d17279881c3f7d02f968e # v4.0.0

Makefile

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
CONTAINER_RUNTIME ?= docker
22
CONTAINER_IMAGE := "ghcr.io/kubewarden/swift-wasm-runner:5.3-p1"
3-
# It's necessary to call cut because kwctl command does not handle version
4-
# starting with v.
5-
VERSION ?= $(shell git describe | cut -c2-)
63

74
build:
85
ifndef CONTAINER_RUNTIME
@@ -44,17 +41,7 @@ endif
4441
@printf "Optimize Wasm binary, hold on...\n"
4542
wasm-opt -Os .build/wasm32-unknown-wasi/release/Policy.wasm -o policy.wasm
4643

47-
artifacthub-pkg.yml: metadata.yml
48-
$(warning If you are updating the artifacthub-pkg.yml file for a release, \
49-
remember to set the VERSION variable with the proper value. \
50-
To use the latest tag, use the following command: \
51-
make VERSION=$$(git describe --tags --abbrev=0 | cut -c2-) annotated-policy.wasm)
52-
kwctl scaffold artifacthub \
53-
--metadata-path metadata.yml --version $(VERSION) \
54-
--output artifacthub-pkg.yml
55-
56-
57-
annotate: artifacthub-pkg.yml
44+
annotate:
5845
kwctl annotate -m metadata.yml -u README.md -o annotated-policy.wasm policy.wasm
5946

6047
e2e-tests:

artifacthub-pkg.yml

Lines changed: 0 additions & 49 deletions
This file was deleted.

metadata.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
rules:
2-
- apiGroups: [""]
3-
apiVersions: ["v1"]
4-
resources: ["pods"]
5-
operations: ["CREATE"]
2+
- apiGroups: [""]
3+
apiVersions: ["v1"]
4+
resources: ["pods"]
5+
operations: ["CREATE"]
66
mutating: false
77
contextAware: false
88
executionMode: kubewarden-wapc
@@ -19,6 +19,7 @@ annotations:
1919
io.kubewarden.policy.ociUrl: ghcr.io/yourorg/policies/policy-name # must match release workflow oci-target
2020
# kubewarden specific:
2121
io.kubewarden.policy.title: policy-name
22+
io.kubewarden.policy.version: 0.0.1-unreleased
2223
io.kubewarden.policy.description: Short description
2324
io.kubewarden.policy.author: "Author name <author-email@example.com>"
2425
io.kubewarden.policy.url: https://github.com/yourorg/policy-name

0 commit comments

Comments
 (0)