forked from jenkinsci/bom
-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (44 loc) · 1.5 KB
/
action-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
43
44
45
46
47
48
49
50
51
52
name: updatecli
on:
workflow_dispatch:
pull_request:
push:
branches:
- master
schedule:
# * is a special character in YAML so you have to quote this string
# Run once a day
- cron: '0 0 * * *'
env:
PLUGIN_MANAGER_VERSION: '2.12.8'
jobs:
updatecli:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install updatecli
uses: updatecli/updatecli-action@v2
- name: Install Jenkins Plugin Installation Manager Tool
run: |
url="https://github.com/jenkinsci/plugin-installation-manager-tool/releases/download/$PLUGIN_MANAGER_VERSION/jenkins-plugin-manager-$PLUGIN_MANAGER_VERSION.jar"
path="${GITHUB_WORKSPACE:-.}/plugin-manager.jar"
curl -sSL "$url" -o "$path"
echo "PLUGIN_MANAGER_JAR_PATH=$path" >> $GITHUB_ENV
- name: Generate updatecli manifests
shell: pwsh
run: |
Set-PSRepository -Name PSGallery -InstallationPolicy Trusted
./updatecli/generate-manifests.ps1
- name: Diff
continue-on-error: true
run: |
updatecli diff --config updatecli/updatecli.d --values updatecli/values.yaml
env:
UPDATECLI_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Apply
if: github.ref == 'refs/heads/master'
run: |
updatecli apply --config updatecli/updatecli.d --values updatecli/values.yaml
env:
UPDATECLI_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}