Check dependency(helm chart) updates #236
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: | |
updateCommonCharts: | |
name: Bump common dependency Helm charts | |
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@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1 | |
- | |
name: Setup updatecli | |
uses: updatecli/updatecli-action@v2 | |
- | |
name: Run Updatecli | |
id: updatecli-apply | |
run: | | |
CHANGELOG=$(updatecli apply --config ${UPDATECLI_CONFIG_DIR}/common-charts.yaml 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 '/^TARGETS$/,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@5e914681df9dc83aa4e4905692ca88beb2f9e91f #v7.0.5 | |
with: | |
token: ${{ steps.app-token.outputs.token }} | |
title: "[kubernetes] Update common dependency helm charts" | |
commit-message: Update common dependency helm charts | |
committer: 🤖QC Owl App[bot] <165384878+qc-owl-app[bot]@users.noreply.github.com> | |
signoff: true | |
body: | | |
🤖 Update common dependency helm charts | |
<details> | |
<summary> FULL TARGETS 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-common-helm-charts | |
delete-branch: true | |
updateLGTMPStackCharts: | |
name: Bump LGTMP stack dependency Helm charts | |
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@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1 | |
- | |
name: Setup updatecli | |
uses: updatecli/updatecli-action@v2 | |
- | |
name: Run Updatecli | |
id: updatecli-apply | |
run: | | |
CHANGELOG=$(updatecli apply --config ${UPDATECLI_CONFIG_DIR}/lgtmp-stack-charts.yaml 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 '/^TARGETS$/,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@5e914681df9dc83aa4e4905692ca88beb2f9e91f #v7.0.5 | |
with: | |
token: ${{ steps.app-token.outputs.token }} | |
title: "[kubernetes] Update LGTMP stack dependency Helm charts" | |
commit-message: Update LGTMP stack dependency Helm charts | |
committer: 🤖QC Owl App[bot] <165384878+qc-owl-app[bot]@users.noreply.github.com> | |
signoff: true | |
body: | | |
🤖 Update LGTMP stack dependency Helm charts | |
<details> | |
<summary> FULL TARGETS 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-lgtmp-helm-charts | |
delete-branch: true |