Automate Codex CLI update proposals #17
This file contains hidden or 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: Lint | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| app: | |
| description: Optional app directory to lint | |
| required: false | |
| type: string | |
| default: "" | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| schedule: | |
| - cron: "0 3 * * 1" | |
| permissions: | |
| contents: read | |
| jobs: | |
| discover: | |
| name: Discover apps | |
| runs-on: ubuntu-latest | |
| outputs: | |
| apps: ${{ steps.select.outputs.apps }} | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v7.0.1 | |
| - name: Find app directories | |
| id: apps | |
| uses: home-assistant/actions/helpers/find-addons@master | |
| - name: Select apps to lint | |
| id: select | |
| shell: bash | |
| env: | |
| ALL_APPS: ${{ steps.apps.outputs.addons_list }} | |
| REQUESTED_APP: ${{ inputs.app || '' }} | |
| run: | | |
| if [[ -z "$REQUESTED_APP" ]]; then | |
| echo "apps=$ALL_APPS" >> "$GITHUB_OUTPUT" | |
| elif jq -e --arg app "$REQUESTED_APP" 'index($app) != null' <<< "$ALL_APPS" >/dev/null; then | |
| echo "apps=$(jq -nc --arg app "$REQUESTED_APP" '[$app]')" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "Unknown app directory: $REQUESTED_APP" >&2 | |
| exit 1 | |
| fi | |
| lint: | |
| name: Lint ${{ matrix.app }} | |
| needs: discover | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| app: ${{ fromJSON(needs.discover.outputs.apps) }} | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v7.0.1 | |
| - name: Run Home Assistant app linter | |
| uses: frenck/action-addon-linter@v2.21 | |
| with: | |
| path: ./${{ matrix.app }} |