forked from open-telemetry/semantic-conventions-java
-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (27 loc) · 988 Bytes
/
reusable-lint-check.yml
File metadata and controls
33 lines (27 loc) · 988 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
name: Reusable - Lint check
on:
workflow_call:
permissions:
contents: read
jobs:
lint-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0 # needed for merge-base used in modified-files mode
- uses: jdx/mise-action@1648a7812b9aeae629881980618f079932869151 # v4.0.1
- name: Lint for pull requests
if: github.event_name == 'pull_request'
env:
GITHUB_TOKEN: ${{ github.token }}
GITHUB_REPOSITORY: ${{ github.repository }}
GITHUB_BASE_REF: ${{ github.base_ref }}
GITHUB_HEAD_REF: ${{ github.head_ref }}
PR_HEAD_REPO: ${{ github.event.pull_request.head.repo.full_name }}
run: mise run lint
- name: Lint for pushes and scheduled workflows
if: github.event_name != 'pull_request'
env:
GITHUB_TOKEN: ${{ github.token }}
run: mise run lint --full