Skip to content

Merge pull request #55 from slashben/k8s-1-30-compatibility #9

Merge pull request #55 from slashben/k8s-1-30-compatibility

Merge pull request #55 from slashben/k8s-1-30-compatibility #9

Workflow file for this run

name: "Release"
on:
push:
branches-ignore:
- "**"
tags:
- "v*"
jobs:
release:

Check failure on line 10 in .github/workflows/release.yaml

View workflow run for this annotation

GitHub Actions / Release

Invalid workflow file

The workflow is not valid. .github/workflows/release.yaml (Line: 10, Col: 3): The workflow must contain at least one job with no dependencies.

Check failure on line 10 in .github/workflows/release.yaml

View workflow run for this annotation

GitHub Actions / Release

Invalid workflow file

The workflow is not valid. .github/workflows/release.yaml (Line: 10, Col: 3): The workflow must contain at least one job with no dependencies.
needs: test-all-policies
runs-on: ubuntu-latest
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
steps:
- uses: actions/checkout@v3
- name: Verify release tagged commit is on main
run: |
git fetch origin main
git merge-base --is-ancestor ${GITHUB_REF##*/} origin/main && echo "${GITHUB_REF##*/} is a commit on main!"
- uses: azure/setup-kubectl@v3
- name: Create release artifacts
run: |
mkdir release
kubectl kustomize apis/k8s-v1/ > release/kubescape-validating-admission-policies-v1.yaml
kubectl kustomize apis/k8s-v1beta1/ > release/kubescape-validating-admission-policies-v1beta1.yaml
kubectl kustomize apis/x-k8s-v1alpha1/ > release/kubescape-validating-admission-policies-x-v1alpha1.yaml
kubectl kustomize apis/k8s-v1alpha1/ > release/kubescape-validating-admission-policies-v1alpha1.yaml
# Making a copy of the v1 file to be used as the default policy release artifact
cp release/kubescape-validating-admission-policies-v1.yaml release/kubescape-validating-admission-policies.yaml
- name: Create a GitHub release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
release/kubescape-validating-admission-policies.yaml
release/kubescape-validating-admission-policies-v1.yaml
release/kubescape-validating-admission-policies-v1beta1.yaml
release/kubescape-validating-admission-policies-x-v1alpha1.yaml
release/kubescape-validating-admission-policies-v1alpha1.yaml
configuration/policy-configuration-definition.yaml
configuration/basic-control-configuration.yaml