chore(deps): update ghcr.io/esphome/esphome docker tag to v2023.9.1 #437
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: Renovate | |
on: | |
push: | |
branches: | |
- renovate/** | |
env: | |
COMMIT_MESSAGE: ":wrench: Update chart metadata" | |
jobs: | |
update-chart-metadata: | |
name: Update Chart Metadata | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Detect Changes | |
uses: dorny/paths-filter@v2 | |
id: changes | |
with: | |
list-files: shell | |
filters: | | |
charts: | |
- charts/** | |
- name: Fetch PR | |
id: pr | |
uses: actions/github-script@v6 | |
with: | |
script: | | |
const response = await github.rest.repos.listPullRequestsAssociatedWithCommit({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
commit_sha: context.sha, | |
}); | |
const pr = response.data.shift(); | |
core.setOutput("title", pr.title); | |
core.setOutput("base_ref", pr.base.ref); | |
core.setOutput("labels", pr.labels.map((e) => e.name).filter((e) => e)); | |
- name: Update changelog | |
env: | |
TITLE: ${{ steps.pr.outputs.title }} | |
CHANGELOG_APPEND: ${{ contains(steps.pr.outputs.labels, 'changelog-append') }} | |
run: | | |
set -eux | |
export DESCRIPTION="$(perl -pe 's/^.+?: (.)/\U$1/' <<<"$TITLE")" | |
CHANGELOG="$(yq -o json '[{"kind": "changed", "description": strenv(DESCRIPTION)}]')" | |
UPDATE_TYPE=replace | |
if [[ "$CHANGELOG_APPEND" == "true" ]]; then | |
UPDATE_TYPE=append | |
fi | |
./hack/update-changelog.sh "$UPDATE_TYPE" "$CHANGELOG" ${{ steps.changes.outputs.charts_files }} | |
- name: Set type to patch | |
if: contains(steps.pr.outputs.labels, 'patch') || contains(steps.pr.outputs.labels, 'digest') | |
run: echo TYPE=patch >>$GITHUB_ENV | |
- name: Set type to minor | |
if: contains(steps.pr.outputs.labels, 'major') || contains(steps.pr.outputs.labels, 'minor') | |
run: echo TYPE=minor >>$GITHUB_ENV | |
- name: Update chart version | |
if: "!contains(steps.pr.outputs.labels, 'skip-version-bump')" | |
run: | | |
set -eux | |
./hack/update-version.sh "$TYPE" ${{ steps.changes.outputs.charts_files }} | |
- name: Install helm-docs | |
uses: gabe565/setup-helm-docs-action@v1 | |
- name: Generate Helm docs | |
run: | | |
set -eu | |
./hack/gen-helm-docs.sh | |
- name: Check if commit exists | |
id: commit_exists | |
env: | |
BASE_REF: ${{ steps.pr.outputs.base_ref }} | |
run: | | |
set -eu | |
IFS=$'\n\t' | |
commits="$(git rev-list --pretty=oneline "origin/$BASE_REF..HEAD" | cut -d' ' -f2-)" | |
if grep -F -e "$COMMIT_MESSAGE" <<<"$commits"; then | |
echo 'result=true' >>$GITHUB_OUTPUT | |
else | |
echo 'result=false' >>$GITHUB_OUTPUT | |
fi | |
- name: Commit chart version | |
uses: stefanzweifel/git-auto-commit-action@v4 | |
if: steps.commit_exists.outputs.result == 'false' && !contains(steps.pr.outputs.labels, 'skip-chart-meta') | |
with: | |
commit_message: ${{ env.COMMIT_MESSAGE }} |