-
Notifications
You must be signed in to change notification settings - Fork 2
42 lines (36 loc) · 1.18 KB
/
updatecli.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
---
name: Updatecli
on:
# Trigger Updatecli if a new commit land on the main branch
push:
branches: [ main ]
# Trigger Updatecli if a pullrequest is open targeting the main branch.
# This is useful to test Updatecli manifest change
pull_request:
branches: [ main ]
# Manually trigger Updatecli via GitHub UI
workflow_dispatch:
# Trigger Updatecli once day by a cronjob
schedule:
# * is a special character in YAML, so you have to quote this string
# Run once a day
- cron: '0 0 * * *'
permissions:
contents: "write"
pull-requests: "write"
jobs:
updatecli:
runs-on: "ubuntu-latest"
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Updatecli in the runner
uses: updatecli/updatecli-action@v2
- name: Run Updatecli in Dry Run mode
run: "updatecli diff --config ./updatecli/updatecli.d --values updatecli/values.yaml"
env:
UPDATECLI_GITHUB_TOKEN: "${{ secrets.UPDATECLI_GITHUB_TOKEN }}"
- name: Run Updatecli in apply mode
run: "updatecli apply --config ./updatecli/updatecli.d --values updatecli/values.yaml"
env:
UPDATECLI_GITHUB_TOKEN: "${{ secrets.UPDATECLI_GITHUB_TOKEN }}"