Add github action to update dependencies #9
Workflow file for this run
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: Check for dependency updates | |
on: | |
workflow_dispatch: | |
schedule: | |
# Run once a day | |
- cron: '0 0 * * *' | |
# Just for now, to make things happen while in PR mode | |
pull_request: | |
permissions: | |
contents: "write" | |
pull-requests: "write" | |
env: | |
UPDATECLI_CONFIG: "${{ github.workspace }}/.github/configs/updatecli.d/node-exporter.yaml" | |
jobs: | |
updateNodeExporter: | |
name: Update Node Exporter | |
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_CONFIG}" | |
env: | |
UPDATECLI_GITHUB_TOKEN: "${{ secrets.GH_BOT_ACCESS_TOKEN }}" | |
- name: Run Updatecli in apply mode | |
run: updatecli apply --config "${UPDATECLI_CONFIG}" | |
env: | |
UPDATECLI_GITHUB_TOKEN: "${{ secrets.GH_BOT_ACCESS_TOKEN }}" | |
- name: Create pull request | |
uses: peter-evans/create-pull-request@v5 | |
# with: | |
# title: [dependency] Update Node Exporter | |
# author: "${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>" | |
# committer: "GitHub <noreply@github.com>" | |
# commit-message: Update Node Exporter | |
# base: main | |
# labels: dependencies | |
# branch: fix/update-node-exporter | |
# delete-branch: true | |
# token: "${{ secrets.GH_BOT_ACCESS_TOKEN }}" |