1
0
mirror of https://github.com/bitwarden/server.git synced 2025-06-07 19:50:32 -05:00

Move linting to dedicated workflow

This commit is contained in:
Matt Bishop 2025-06-07 10:50:49 -04:00
parent 938c3eaf25
commit af69591b58
No known key found for this signature in database
2 changed files with 29 additions and 21 deletions

View File

@ -20,26 +20,9 @@ env:
_GITHUB_PR_REPO_NAME: ${{ github.event.pull_request.head.repo.full_name }}
jobs:
lint:
name: Lint
runs-on: ubuntu-24.04
steps:
- name: Check out repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Set up .NET
uses: actions/setup-dotnet@87b7050bc53ea08284295505d98d2aa94301e852 # v4.2.0
- name: Verify format
run: dotnet format --verify-no-changes
build-artifacts:
name: Build Docker images
runs-on: ubuntu-24.04
needs:
- lint
outputs:
has_secrets: ${{ steps.check-secrets.outputs.has_secrets }}
permissions:
@ -466,8 +449,6 @@ jobs:
build-mssqlmigratorutility:
name: Build MSSQL migrator utility
runs-on: ubuntu-24.04
needs:
- lint
defaults:
run:
shell: bash
@ -607,7 +588,6 @@ jobs:
if: always()
runs-on: ubuntu-22.04
needs:
- lint
- build-artifacts
- upload
- build-mssqlmigratorutility

28
.github/workflows/lint.yml vendored Normal file
View File

@ -0,0 +1,28 @@
name: Lint
on:
pull_request:
types: [opened, synchronize]
permissions:
contents: read
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true
jobs:
lint:
name: Lint
runs-on: ubuntu-24.04
permissions:
pull-requests: write
steps:
- name: Check out repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Lint with MegaLinter
uses: oxsecurity/megalinter/flavors/formatters@5a91fb06c83d0e69fbd23756d47438aa723b4a5a # v8.7.0
env:
VALIDATE_ALL_CODEBASE: false