Skip to content

Updatecli

Updatecli #7682

Workflow file for this run

name: Updatecli
on:
# Allow to manually trigger Updatecli
workflow_dispatch:
# Trigger Updatecli on main branch changes
# To rebase existing PR
push:
branches: [main]
# Trigger Updatecli pullrequest to test potential changes
pull_request:
branches: [main]
# Periodically checks update
schedule:
# Run every hour
- cron: "0 * * * *"
jobs:
updatecli:
name: Run Updatecli
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install Updatecli in the runner
uses: updatecli/updatecli-action@2c3221bc5f4499a99fec2c87d9de4a83cb30e990 # v3.1.3
- name: Run Updatecli (dryrun)
if: github.ref != 'refs/heads/main'
env:
# As a reminder, a pipeline create
UPDATECLI_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
UPDATECLI_GITHUB_USERNAME: ${{ github.repository_owner }}
run: "updatecli compose diff --file updatecli/updatecli-compose.yaml"
- name: Run Updatecli
if: github.ref == 'refs/heads/main'
env:
UPDATECLI_GITHUB_APP_CLIENT_ID: ${{ secrets.APP_ID }}
UPDATECLI_GITHUB_APP_PRIVATE_KEY: ${{ secrets.APP_PRIVATE_KEY }}
UPDATECLI_GITHUB_APP_INSTALLATION_ID: "${{ secrets.APP_INSTALLATION_ID }}"
run: "updatecli compose apply --file updatecli/updatecli-compose.yaml"