2020-08-11 05:46:13 +05:30
|
|
|
name: prereleaser
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
tags:
|
|
|
|
- '*'
|
|
|
|
|
|
|
|
jobs:
|
2020-08-11 22:34:25 +05:30
|
|
|
docker-and-e2e:
|
2020-08-11 05:46:13 +05:30
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
-
|
|
|
|
name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
-
|
|
|
|
name: Unshallow
|
|
|
|
run: git fetch --prune --unshallow
|
|
|
|
-
|
|
|
|
name: Set up Go
|
|
|
|
uses: actions/setup-go@v2
|
|
|
|
with:
|
|
|
|
go-version: 1.14
|
|
|
|
- uses: creekorful/goreportcard-action@v1.0
|
2020-08-11 22:02:51 +05:30
|
|
|
|
2020-11-24 12:56:35 -08:00
|
|
|
- name: login to GitHub Container Registry
|
|
|
|
run: echo ${{ secrets.CR_PAT }} | docker login ghcr.io -u ${{ github.repository_owner }} --password-stdin
|
2020-08-11 22:02:51 +05:30
|
|
|
|
|
|
|
- name : docker images publish
|
|
|
|
run: |
|
|
|
|
make docker-publish-all
|
|
|
|
|
|
|
|
- name : Create Kind Cluster and setup kustomize
|
|
|
|
run: |
|
|
|
|
make ci
|
|
|
|
|
|
|
|
- name: e2e testing
|
|
|
|
run: |
|
|
|
|
echo ">>> Install Kyverno"
|
|
|
|
sed 's/imagePullPolicy:.*$/imagePullPolicy: IfNotPresent/g' ${GITHUB_WORKSPACE}/definitions/install.yaml | kubectl apply -f -
|
|
|
|
kubectl apply -f ${GITHUB_WORKSPACE}/definitions/github/rbac.yaml
|
|
|
|
chmod a+x ${GITHUB_WORKSPACE}/scripts/verify-deployment.sh
|
|
|
|
sleep 50
|
|
|
|
echo ">>> Check kyverno"
|
|
|
|
kubectl get pods -n kyverno
|
|
|
|
${GITHUB_WORKSPACE}/scripts/verify-deployment.sh -n kyverno kyverno
|
|
|
|
echo ">>> Run Kyverno e2e test"
|
|
|
|
make test-e2e
|
|
|
|
|
2020-11-24 15:00:18 -08:00
|
|
|
create-release-gh-helm-krew:
|
2020-08-11 22:34:25 +05:30
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2020-11-24 14:26:19 -08:00
|
|
|
- name: Checkout
|
2020-08-22 00:54:02 +05:30
|
|
|
uses: actions/checkout@v2
|
2020-11-24 15:00:18 -08:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
2020-11-24 14:26:19 -08:00
|
|
|
|
|
|
|
- name: Set up Go
|
2020-08-22 00:54:02 +05:30
|
|
|
uses: actions/setup-go@v2
|
|
|
|
with:
|
|
|
|
go-version: 1.14
|
|
|
|
|
2020-11-24 14:26:19 -08:00
|
|
|
- name: Run GoReleaser
|
2020-08-11 05:46:13 +05:30
|
|
|
uses: goreleaser/goreleaser-action@v2
|
|
|
|
with:
|
|
|
|
version: latest
|
|
|
|
args: release --rm-dist
|
|
|
|
env:
|
2020-11-24 13:38:43 -08:00
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
2020-08-11 05:46:13 +05:30
|
|
|
|
2020-11-24 14:52:40 -08:00
|
|
|
- name: Configure Git
|
|
|
|
run: |
|
|
|
|
git config user.name "$GITHUB_ACTOR"
|
|
|
|
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
|
2020-11-24 14:44:11 -08:00
|
|
|
|
2020-11-24 14:52:40 -08:00
|
|
|
- name: Install Helm
|
|
|
|
uses: azure/setup-helm@v1
|
2020-11-24 14:44:11 -08:00
|
|
|
with:
|
2020-11-24 14:52:40 -08:00
|
|
|
version: v3.4.0
|
2020-11-24 14:44:11 -08:00
|
|
|
|
2020-11-24 14:52:40 -08:00
|
|
|
- name: Run chart-releaser
|
|
|
|
uses: helm/chart-releaser-action@v1.1.0
|
|
|
|
env:
|
2020-11-24 15:00:18 -08:00
|
|
|
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|
|
|
|
|
|
|
|
- name: Update new version in krew-index
|
|
|
|
uses: rajatjindal/krew-release-bot@v0.0.38
|