-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (42 loc) · 1.2 KB
/
kubediff.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: Kube diff
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
PR_DIR: pr
TARGET_DIR: target
ENVS_DIR: manifests/groups
GOPATH: ${{ github.workspace }}/go
permissions:
contents: read
pull-requests: write
jobs:
kube-diff:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- name: Checkout PR branch
uses: actions/checkout@v3
with:
path: ${{ env.PR_DIR }}
- name: Checkout Target branch
uses: actions/checkout@v3
with:
path: ${{ env.TARGET_DIR }}
ref: ${{ github.event.pull_request.base.ref }}
- name: setup kustomize
shell: bash
run: curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | bash
- uses: actions/setup-go@v4
with:
go-version: 1.20.1
- env:
GLOB_LEVELS: 3
ENVS_DIR: manifests/groups
GITHUB_OWNER: ${{ github.repository_owner }}
GITHUB_REPO: ${{ github.event.repository.name }}
GITHUB_PR_NUMBER: ${{ github.event.pull_request.number }}
GITHUB_TOKEN: ${{ github.token }}
run: go run github.com/cyclingwithelephants/kubediff/cmd@main