updatecli #916
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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@v3 | |
- 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 }} |