update to 2023.4.6 #88
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 home-assistant configuration' | |
on: | |
pull_request_target: | |
workflow_dispatch: | |
jobs: | |
homeassistant: | |
name: 'validate home-assistant configuration' | |
runs-on: ubuntu-latest | |
steps: | |
- name: 'workaround for nektos/act' | |
run: | | |
if [ ! -f "/etc/lsb-release" ] ; then | |
echo "DISTRIB_RELEASE=18.04" > /etc/lsb-release | |
fi | |
- name: 'checkout' | |
uses: actions/checkout@v3 | |
- run: mv secrets secrets.old || true | |
- run: mkdir secrets | |
- run: cp -v ci/secrets.yaml secrets.yaml | |
- run: cp -v ci/google-cloud-tts.json secrets/google-cloud-tts.json | |
- run: cp -v ci/google-assistant.json secrets/google-assistant.json | |
- name: 'ensure custom_components are populated' | |
run: | | |
mkdir custom_components/browser_mod/ || true | |
wget $(curl --silent "https://api.github.com/repos/thomasloven/hass-browser_mod/releases/latest" | jq .tarball_url -r) -O browser_mod_latest.tar.gz | |
tar_dir=$(tar -tf browser_mod_latest.tar.gz | grep -E 'custom_components/browser_mod/$') | |
tar -zxvf browser_mod_latest.tar.gz --strip-components=3 -C custom_components/browser_mod/ $tar_dir | |
- name: 'check homeassistant config' | |
id: check | |
uses: frenck/action-home-assistant@v1 | |
continue-on-error: true | |
- name: 'comment on PR' | |
if: github.event_name == 'pull_request_target' | |
uses: actions/github-script@v6 | |
with: | |
script: | | |
const commentContent = `config check: ${{ steps.check.outcome }}`; | |
await github.rest.issues.createComment({ | |
issue_number: context.issue.number, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
body: commentContent | |
}) | |
- name: 'fail if config validation fails' | |
if: steps.check.outcome == 'failure' | |
run: exit 1 |