-
Notifications
You must be signed in to change notification settings - Fork 1
48 lines (45 loc) · 1.51 KB
/
check-and-push-update.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
name: checking updates
on:
workflow_dispatch:
schedule:
- cron: "40 00 * * *"
jobs:
raw-manifests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.7"
- name: Install dependencies
run: |
echo "downloading yq"
python -m pip install --upgrade pip
pip install yq
yq --version
KUSTOMIZE=3.5.5
echo "downloading kustomize ${KUSTOMIZE}"
curl -sL https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize%2Fv${KUSTOMIZE}/kustomize_v${KUSTOMIZE}_linux_amd64.tar.gz | \
tar xz && mv kustomize /usr/local/bin/kustomize
kustomize version
- name: Check last upstream version
id: lastrelease
run: |
get_latest_release() {
curl -s "https://api.github.com/repos/tektoncd/pipeline/releases" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/'|head -n 1
}
echo "::set-output name=latest_tag::$(get_latest_release)"
- name: execute hack
id: hack
env:
RELEASE: ${{ steps.lastrelease.outputs.latest_tag }}
run: |
cd deploy
../hack/new-release.sh ${RELEASE}
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Automated Update to version ${{ steps.lastrelease.outputs.latest_tag }}
branch: main
file_pattern: deploy/*.yaml
tagging_message: ${{ steps.lastrelease.outputs.latest_tag }}