|
| 1 | +--- |
| 2 | +name: "Updatecli: Check for dependency updates" |
| 3 | + |
| 4 | +on: |
| 5 | + workflow_dispatch: |
| 6 | + schedule: |
| 7 | + # * is a special character in YAML so you have to quote this string |
| 8 | + # Run once a day |
| 9 | + - cron: '0 7 * * *' |
| 10 | + |
| 11 | +env: |
| 12 | + UPDATECLI_CONFIG_DIR: "${{ github.workspace }}/.github/updatecli.d" |
| 13 | + |
| 14 | +jobs: |
| 15 | + updatecli: |
| 16 | + name: Update dependency helm charts |
| 17 | + runs-on: "ubuntu-latest" |
| 18 | + steps: |
| 19 | + - |
| 20 | + name: Create Github App[bot] Token |
| 21 | + uses: actions/create-github-app-token@v1 |
| 22 | + id: app-token |
| 23 | + with: |
| 24 | + app-id: ${{ vars.APP_ID }} |
| 25 | + private-key: ${{ secrets.PRIVATE_KEY }} |
| 26 | + - |
| 27 | + name: Checkout |
| 28 | + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1 |
| 29 | + - |
| 30 | + name: Setup updatecli |
| 31 | + uses: updatecli/updatecli-action@v2 |
| 32 | + - |
| 33 | + name: Run Updatecli |
| 34 | + id: updatecli-apply |
| 35 | + run: | |
| 36 | + updatecli apply --config ${UPDATECLI_CONFIG_DIR}/deps-charts.yaml > changelog.out 2>&1 |
| 37 | + if ! git diff --exit-code > /dev/null; then |
| 38 | + echo "changed=true" >> "${GITHUB_OUTPUT}" |
| 39 | + echo "body=$(cat changelog.out | awk 'NR >= 22')" >> "${GITHUB_OUTPUT}" |
| 40 | + fi |
| 41 | + - |
| 42 | + name: Create pull request |
| 43 | + if: steps.updatecli-apply.outputs.changed == 'true' |
| 44 | + uses: peter-evans/create-pull-request@c55203cfde3e5c11a452d352b4393e68b85b4533 #v6.0.3 |
| 45 | + with: |
| 46 | + token: ${{ steps.app-token.outputs.token }} |
| 47 | + title: "[updatecli] Bump dependency helm charts version to latest" |
| 48 | + commit-message: Updates dependency helm charts |
| 49 | + committer: 🤖QC Owl App[bot] <165384878+qc-owl-app[bot]@users.noreply.github.com> |
| 50 | + signoff: true |
| 51 | + body: | |
| 52 | + 🤖 Updates Dependency Helm Charts |
| 53 | +
|
| 54 | + <details> |
| 55 | + <summary> FULL CHANGELOG </summary> |
| 56 | + <blockquote> |
| 57 | +
|
| 58 | + ${{ steps.updatecli-apply.outputs.body }} |
| 59 | +
|
| 60 | + </blockquote> |
| 61 | + </details> |
| 62 | + <br /> |
| 63 | +
|
| 64 | + > Auto-generated by [.github/workflows/updatecli.yml][0] |
| 65 | +
|
| 66 | + [0]: https://github.com/qclaogui/codelab-monitoring/blob/main/.github/workflows/updatecli.yml |
| 67 | + labels: dependencies |
| 68 | + branch: update-helm-charts |
| 69 | + delete-branch: true |
0 commit comments