No yamllint exceptions #1207
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: ESPHome | |
on: # yamllint disable-line rule:truthy | |
pull_request: | |
paths: | |
- 'esphome/**' | |
- '.github/workflows/esphome**' | |
push: | |
branches: [main] | |
paths: | |
- 'esphome/**' | |
- '.github/workflows/esphome**' | |
schedule: | |
- cron: 0 12 * * * | |
jobs: | |
files: # Job that lists files | |
name: Discover ESPHome files | |
runs-on: ubuntu-latest | |
outputs: | |
# Generate output name file by using inner step output | |
file: ${{ steps.set-files.outputs.file }} | |
steps: | |
- name: Getting your configuration from GitHub | |
uses: actions/checkout@v4 | |
- name: Get list of files | |
# ID is referenced by outputs above | |
id: set-files | |
# Use jq to create a named file list | |
run: echo "::set-output name=file::$(ls esphome/*.yaml | jq -R -s -c 'split("\n")[:-1]')" # yamllint disable-line rule:line-length | |
loop-stable: | |
name: Test ESPHome Stable firmware | |
runs-on: ubuntu-latest | |
needs: [files] # Depends on previous job | |
strategy: | |
matrix: | |
# List matrix strategy from files dynamically | |
file: ${{fromJson(needs.files.outputs.file)}} | |
steps: | |
- name: Getting your configuration from GitHub | |
uses: actions/checkout@v4 | |
- name: ESPHome Version | |
uses: "docker://esphome/esphome:stable" | |
with: | |
args: "version" | |
- name: Copy stub files into configuration folder | |
if: ${{ steps.esphome-test-required.outputs.ESPHOME_CHANGES != 'false' }} # yamllint disable-line rule:line-length | |
run: | | |
cp -R esphome/travis_secrets.yaml.txt esphome/common/secrets.yaml | |
cp -R esphome/travis_secrets.yaml.txt esphome/secrets.yaml | |
- name: Compile all ESPHome ${{matrix.file}} | |
uses: esphome/build-action@v3 | |
with: | |
version: stable | |
yaml_file: ${{matrix.file}} | |
loop-beta: | |
name: Test ESPHome Beta firmware | |
runs-on: ubuntu-latest | |
needs: [files] # Depends on previous job | |
strategy: | |
matrix: | |
# List matrix strategy from files dynamically | |
file: ${{fromJson(needs.files.outputs.file)}} | |
steps: | |
- name: Getting your configuration from GitHub | |
uses: actions/checkout@v4 | |
- name: ESPHome Version | |
uses: "docker://esphome/esphome:beta" | |
with: | |
args: "version" | |
- name: Copy stub files into configuration folder | |
if: ${{ steps.esphome-test-required.outputs.ESPHOME_CHANGES != 'false' }} # yamllint disable-line rule:line-length | |
run: | | |
cp -R esphome/travis_secrets.yaml.txt esphome/common/secrets.yaml | |
cp -R esphome/travis_secrets.yaml.txt esphome/secrets.yaml | |
- name: Compile all ESPHome ${{matrix.file}} | |
uses: esphome/build-action@v3 | |
with: | |
version: beta | |
yaml_file: ${{matrix.file}} | |
# This is used by branch protections | |
final: | |
name: Final ESPHome check | |
runs-on: ubuntu-latest | |
needs: [loop-stable, loop-beta] | |
steps: | |
- name: Getting your configuration from GitHub | |
uses: actions/checkout@v4 |