This repository was archived by the owner on Mar 1, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (48 loc) · 1.81 KB
/
update-istio.yaml
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
51
52
53
54
55
56
57
58
59
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions
name: "Update istio"
on: # yamllint disable-line rule:truthy
schedule:
- cron: "0 8 */1 * *"
push:
branches:
- "main"
jobs:
check-istio:
runs-on: "ubuntu-latest"
steps:
- name: "Git checkout"
uses: "actions/checkout@v2"
with:
fetch-depth: 2
env:
GIT_COMMITTER_NAME: "GitHub Actions Shell"
GIT_AUTHOR_NAME: "GitHub Actions Shell"
EMAIL: "github-actions[bot]@users.noreply.github.com"
- name: "Setup Helm"
uses: "./.github/actions/helm"
- name: "Check for updates"
id: "check"
run: |
curl -sL https://istio.io/downloadIstio | sh -
ISTIO_DIR=$(find . -name 'istio-*' -type d -maxdepth 1 -print | head -n1)
ISTIO_VER=${ISTIO_DIR##./istio-}
echo "Build manifests for ${ISTIO_VER} in dir ${ISTIO_DIR}"
helm template ${ISTIO_DIR}/manifests/charts/istio-operator/ \
--set hub=docker.io/istio \
--set tag=${ISTIO_VER} \
--set enableCRDTemplates=true \
--set operatorNamespace=istio-operator \
--set istioNamespace=istio-system > ./cluster/istio/operator/manifests.yaml
rm -rf ${ISTIO_DIR}
if [[ $(git diff --stat) != '' ]]; then
echo ::set-output name=version::${ISTIO_VER}
fi
- name: "Create Pull Request"
uses: peter-evans/create-pull-request@v4
if: "steps.check.outputs.version"
with:
commit-message: "feat: update Istio to ${{ steps.check.outputs.version }}"
title: "feat: update Istio to ${{ steps.check.outputs.version }}"
body: |
Istio operator v${{ steps.check.outputs.version }}
branch: "update-istio"