--- name: Workflow Linter on: pull_request: paths: - .github/workflows/** workflow_call: jobs: lint: name: "Workflow Linter" runs-on: ubuntu-20.04 steps: - name: Checkout Branch uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 with: fetch-depth: 0 - name: Get changed workflows id: changed-workflows run: | MODIFIED_WORKFLOWS=$(git diff --name-only origin/${{ github.base_ref }} | grep -E '.github/workflows/.*.yml' | tr '\n' ' ') echo "::set-output name=modified-workflows::$MODIFIED_WORKFLOWS" - name: Workflow Lint env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} uses: bitwarden/gh-actions/lint-workflow@12bf897758152e7918d0fa273a250ab3708de837 with: workflows: ${{ steps.changed-workflows.outputs.modified-workflows }}