Check dependency(helm chart) updates #321
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 dependency(helm chart) updates" | |
on: | |
workflow_dispatch: | |
schedule: | |
# * is a special character in YAML so you have to quote this string | |
# Run once a day | |
- cron: '0 7 * * *' | |
env: | |
UPDATECLI_CONFIG_DIR: "${{ github.workspace }}/.github/updatecli.d" | |
jobs: | |
updateHelmCharts: | |
name: Bump up helm chart dependencies | |
runs-on: "ubuntu-latest" | |
steps: | |
- | |
name: Create Github App[bot] Token | |
uses: actions/create-github-app-token@v1 | |
id: app-token | |
with: | |
app-id: ${{ vars.APP_ID }} | |
private-key: ${{ secrets.PRIVATE_KEY }} | |
- | |
name: Checkout | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2 | |
- | |
name: Setup updatecli | |
uses: updatecli/updatecli-action@v2 | |
- | |
name: Run Updatecli | |
id: updatecli-apply | |
run: | | |
CHANGELOG=$(updatecli apply --config ${UPDATECLI_CONFIG_DIR}/kubernetes 2>&1) | |
if ! git diff --exit-code > /dev/null; then | |
echo "changed=true" >> "${GITHUB_OUTPUT}" | |
echo "body<<EOF" >> ${GITHUB_OUTPUT} | |
# here we can place the command that will generate multi-line text | |
echo "${CHANGELOG}" | awk '/^SUMMARY:$/,0' >> "${GITHUB_OUTPUT}" | |
echo "EOF" >> ${GITHUB_OUTPUT} | |
fi | |
- | |
name: Create pull request | |
if: steps.updatecli-apply.outputs.changed == 'true' | |
uses: peter-evans/create-pull-request@dd2324fc52d5d43c699a5636bcf19fceaa70c284 #v7.0.7 | |
with: | |
token: ${{ steps.app-token.outputs.token }} | |
title: "[kubernetes] Update Helm chart dependencies" | |
commit-message: Update Helm chart dependencies | |
committer: 🤖QC Owl App[bot] <165384878+qc-owl-app[bot]@users.noreply.github.com> | |
signoff: true | |
body: | | |
🤖 Update Helm chart dependencies | |
<details> | |
<summary> FULL SUMMARY CHANGELOG </summary> | |
<blockquote> | |
${{ steps.updatecli-apply.outputs.body }} | |
</blockquote> | |
</details> | |
<br /> | |
> Auto-generated by [.github/workflows/updatecli.yml][0] | |
[0]: https://github.com/qclaogui/codelab-monitoring/blob/main/.github/workflows/updatecli.yml | |
labels: dependencies | |
branch: update-helm-charts | |
delete-branch: true | |
updateDockerImages: | |
name: Bump up docker image dependencies | |
runs-on: "ubuntu-latest" | |
steps: | |
- | |
name: Create Github App[bot] Token | |
uses: actions/create-github-app-token@v1 | |
id: app-token | |
with: | |
app-id: ${{ vars.APP_ID }} | |
private-key: ${{ secrets.PRIVATE_KEY }} | |
- | |
name: Checkout | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2 | |
- | |
name: Setup updatecli | |
uses: updatecli/updatecli-action@v2 | |
- | |
name: Run Updatecli | |
id: updatecli-apply | |
run: | | |
CHANGELOG=$(updatecli apply --config ${UPDATECLI_CONFIG_DIR}/docker-compose 2>&1) | |
if ! git diff --exit-code > /dev/null; then | |
echo "changed=true" >> "${GITHUB_OUTPUT}" | |
echo "body<<EOF" >> ${GITHUB_OUTPUT} | |
# here we can place the command that will generate multi-line text | |
echo "${CHANGELOG}" | awk '/^SUMMARY:$/,0' >> "${GITHUB_OUTPUT}" | |
echo "EOF" >> ${GITHUB_OUTPUT} | |
fi | |
- | |
name: Create pull request | |
if: steps.updatecli-apply.outputs.changed == 'true' | |
uses: peter-evans/create-pull-request@dd2324fc52d5d43c699a5636bcf19fceaa70c284 #v7.0.7 | |
with: | |
token: ${{ steps.app-token.outputs.token }} | |
title: "[docker-compose] Update Docker image dependencies" | |
commit-message: Update Docker image dependencies | |
committer: 🤖QC Owl App[bot] <165384878+qc-owl-app[bot]@users.noreply.github.com> | |
signoff: true | |
body: | | |
🤖 Update Docker image dependencies | |
<details> | |
<summary> FULL SUMMARY CHANGELOG </summary> | |
<blockquote> | |
${{ steps.updatecli-apply.outputs.body }} | |
</blockquote> | |
</details> | |
<br /> | |
> Auto-generated by [.github/workflows/updatecli.yml][0] | |
[0]: https://github.com/qclaogui/codelab-monitoring/blob/main/.github/workflows/updatecli.yml | |
labels: dependencies | |
branch: update-docker-images | |
delete-branch: true |