Skip to content

Commit 3ca86d5

Browse files
committed
Use get-istioctl action in the update workflow
Signed-off-by: Stefan Prodan <[email protected]>
1 parent 985210a commit 3ca86d5

File tree

2 files changed

+10
-44
lines changed

2 files changed

+10
-44
lines changed

.github/actions/helm/action.yml

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

.github/workflows/update-istio.yaml

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -16,31 +16,21 @@ jobs:
1616
uses: actions/checkout@v2
1717
with:
1818
ref: main
19-
- name: Setup Helm
20-
uses: ./.github/actions/helm
19+
- name: get istioctl latest version
20+
id: get-istioctl
21+
uses: istio/get-istioctl@e9b2b82bc1cecf150ec6aee77ceee8c256f4faf4
2122
with:
22-
version: 3.5.3
23+
version: "1.*"
2324
- name: Check for updates
2425
id: check
26+
env:
27+
ISTIO_VERSION: ${{ steps.get-istioctl.outputs.istioctl-url }}
2528
run: |
26-
git config user.name github-actions
27-
git config user.email [email protected]
28-
29-
curl -sL https://istio.io/downloadIstio | sh -
30-
ISTIO_DIR=$(find . -name 'istio-*' -type d -maxdepth 1 -print | head -n1)
31-
ISTIO_VER=${ISTIO_DIR##./istio-}
32-
33-
echo "Build manifests for ${ISTIO_VER} in dir ${ISTIO_DIR}"
34-
helm template --include-crds \
35-
--namespace istio-operator \
36-
${ISTIO_DIR}/manifests/charts/istio-operator/ > ./istio/operator/manifests.yaml
37-
38-
cat ${ISTIO_DIR}/samples/addons/prometheus.yaml > ./istio/system/prometheus.yaml
39-
40-
rm -rf ${ISTIO_DIR}
29+
echo "Found Istio version ${ISTIO_VERSION}"
30+
yq eval '.data.version=env(ISTIO_VERSION)' -i ./clusters/my-cluster/istio-version.yaml
4131
4232
if [[ $(git diff --stat) != '' ]]; then
43-
echo ::set-output name=version::${ISTIO_VER}
33+
echo ::set-output name=version::${ISTIO_VERSION}
4434
fi
4535
- name: Create Pull Request
4636
uses: peter-evans/create-pull-request@v3
@@ -52,5 +42,5 @@ jobs:
5242
commit-message: Update Istio to ${{ steps.check.outputs.version }}
5343
title: Update Istio to ${{ steps.check.outputs.version }}
5444
body: |
55-
Istio operator v${{ steps.check.outputs.version }}
45+
Istio v${{ steps.check.outputs.version }}
5646
branch: update-istio

0 commit comments

Comments
 (0)