diff --git a/.github/workflows/lint-mixins.yml b/.github/workflows/lint-mixins.yml index 4da36b8b7..7d29c7606 100644 --- a/.github/workflows/lint-mixins.yml +++ b/.github/workflows/lint-mixins.yml @@ -43,3 +43,41 @@ jobs: - name: List all changed mixins run: echo '${{ steps.changed-mixins.outputs.all_changed_files }}' + + lint-mixin: + name: Lint Mixin + runs-on: ubuntu-latest + permissions: + issues: write + contents: write + pull-requests: write + repository-projects: write + timeout-minutes: 15 + needs: [check-for-changed-mixins] + strategy: + matrix: + mixin: ${{ fromJSON(needs.check-for-changed-mixins.outputs.changed-mixins) }} + fail-fast: false + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Setup Go + uses: actions/setup-go@v5 + with: + go-version: 1.18 + + - name: Install CI dependencies + run: make install-ci-deps + + - name: Install Mixin dependencies + working-directory: ./${{ matrix.mixin }} + run: jb install + + - name: Lint Mixin + working-directory: ./${{ matrix.mixin }} + run: mixtool lint mixin.libsonnet + + \ No newline at end of file