Skip to content

Commit

Permalink
Matrix the version check
Browse files Browse the repository at this point in the history
  • Loading branch information
rohankapoorcom committed Jan 12, 2025
1 parent 11dd6bf commit a0e4649
Showing 1 changed file with 28 additions and 1 deletion.
29 changes: 28 additions & 1 deletion .github/workflows/check-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,36 @@ jobs:
uses: actions/checkout@v4
- name: Run yamllint
uses: frenck/action-yamllint@v1
prepare-versions:
name: Prepare matrix of versions
needs: [yamllint]
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.determine_version.outputs.version }}
steps:
- name: Check out configuration from Github
uses: actions/checkout@v4
- name: Determine currently running Home Assistant Core version
shell: bash
id: determine_version
run: |
if [[ -f ".HA_VERSION" ]]; then
version="[\"$(<'.HA_VERSION')\", \"stable\", \"beta\", \"dev\"]"
else
echo "::warning ::No specific version found; Using "\
"['stable', 'beta', 'dev'] instead. Ensure the '.HA_VERSION' file"\
"is in your repository."
version="[\"stable\", \"beta\", \"dev\"]"
fi
echo "version=${version}" >> "$GITHUB_OUTPUT"

Check failure on line 43 in .github/workflows/check-config.yml

View workflow job for this annotation

GitHub Actions / yamllint

trailing spaces
home-assistant:
name: Home Assistant Config Check
name: Home Assistant Core ${{ matrix.version }} Config Check
needs: [yamllint, prepare-versions]
runs-on: ubuntu-latest
strategy:
matrix:
version: ${{ needs.prepare-versions.outputs.matrix}}
steps:
- name: Check out configuration from GitHub
uses: actions/checkout@v4
Expand Down

0 comments on commit a0e4649

Please sign in to comment.