Home Assistant CI #1719
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: Home Assistant CI | |
# yamllint disable-line rule:truthy | |
on: | |
push: | |
pull_request: | |
workflow_dispatch: | |
schedule: | |
- cron: 0 12 * * * | |
jobs: | |
yamllint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Getting your configuration from GitHub | |
uses: actions/checkout@v3 | |
- name: Running YAMLlint | |
uses: ibiqlik/action-yamllint@v3 | |
continue-on-error: true | |
with: | |
config_file: .github/yamllint-config.yml | |
# https://github.com/ibiqlik/action-yamllint/issues/14#issuecomment-796554388 | |
format: parsable | |
remarklint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Getting your configuration from GitHub | |
uses: actions/checkout@v3 | |
- name: Running Remark lint | |
uses: "docker://pipelinecomponents/remark-lint:latest" | |
continue-on-error: true | |
with: | |
args: "remark --no-stdout --color --frail --use preset-lint-recommended ." | |
ha-stable-check: | |
name: "Home Assistant Core Stable Configuration Check" | |
needs: [yamllint, remarklint] | |
runs-on: ubuntu-latest | |
steps: | |
- name: β€΅οΈ Check out configuration from GitHub | |
uses: actions/checkout@v3 | |
- name: β Create dummy files | |
run: | | |
sed -e '/delete:/d' < configuration.yaml > configuration.yaml | |
- name: π Run Home Assistant Configuration Check | |
uses: frenck/action-home-assistant@v1 | |
with: | |
path: "./" | |
secrets: ./secrets.yaml.sample | |
version: "stable" | |
ha-future-checks: | |
name: "Home Assistant Core ${{ matrix.version }} Configuration Check" | |
needs: [yamllint, remarklint] | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
version: ["beta", "dev"] | |
steps: | |
- name: β€΅οΈ Check out configuration from GitHub | |
uses: actions/checkout@v3 | |
- name: β Create dummy files | |
run: | | |
sed -e '/delete:/d' < configuration.yaml > configuration.yaml | |
- name: π Run Home Assistant Configuration Check | |
uses: frenck/action-home-assistant@v1 | |
with: | |
path: "./" | |
secrets: ./secrets.yaml.sample | |
version: "${{ matrix.version }}" | |
deploy: | |
name: "Deploy changes" | |
needs: [ha-stable-check] | |
runs-on: ubuntu-latest | |
steps: | |
- name: π Tailscale | |
uses: tailscale/github-action@v2 | |
with: | |
authkey: ${{ secrets.TAILSCALE_AUTHKEY }} | |
- name: π Deploying | |
uses: fjogeleit/http-request-action@master | |
with: | |
url: '${{ secrets.DEPLOYMENT_URL }}' | |
method: POST | |
customHeaders: '{"Content-Type":"application/json"}' | |
data: '{ "key":"${{ secrets.PULL_KEY }}" }' |