mirror of https://github.com/bitcoin/bitcoin.git
ci: port lint
Co-authored-by: Max Edwards <youwontforgetthis@gmail.com>
This commit is contained in:
parent
d290a8e6ea
commit
bc41848d00
|
@ -525,3 +525,32 @@ jobs:
|
||||||
|
|
||||||
- name: Save caches
|
- name: Save caches
|
||||||
uses: ./.github/actions/save-caches
|
uses: ./.github/actions/save-caches
|
||||||
|
|
||||||
|
lint:
|
||||||
|
name: 'lint'
|
||||||
|
needs: runners
|
||||||
|
runs-on: ${{ needs.runners.outputs.use-cirrus-runners == 'true' && 'ghcr.io/cirruslabs/ubuntu-runner-amd64:24.04-sm' || 'ubuntu-24.04' }}
|
||||||
|
if: ${{ vars.SKIP_BRANCH_PUSH != 'true' || github.event_name == 'pull_request' }}
|
||||||
|
timeout-minutes: 20
|
||||||
|
env:
|
||||||
|
CONTAINER_NAME: "bitcoin-linter"
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v5
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Configure Docker
|
||||||
|
uses: ./.github/actions/configure-docker
|
||||||
|
with:
|
||||||
|
use-cirrus: ${{ needs.runners.outputs.use-cirrus-runners }}
|
||||||
|
|
||||||
|
- name: CI script
|
||||||
|
run: |
|
||||||
|
set -o xtrace
|
||||||
|
docker buildx build -t "$CONTAINER_NAME" $DOCKER_BUILD_CACHE_ARG --file "./ci/lint_imagefile" .
|
||||||
|
CIRRUS_PR_FLAG=""
|
||||||
|
if [ "${{ github.event_name }}" = "pull_request" ]; then
|
||||||
|
CIRRUS_PR_FLAG="-e CIRRUS_PR=1"
|
||||||
|
fi
|
||||||
|
docker run --rm $CIRRUS_PR_FLAG -v "$(pwd)":/bitcoin "$CONTAINER_NAME"
|
||||||
|
|
Loading…
Reference in New Issue