Merge pull request #2340 from crazy-max/v0.13_backport_ci-lint-multi

[v0.13 backport] ci: enable multi-platform lint only for upstream repo
This commit is contained in:
CrazyMax 2024-03-14 11:12:57 +01:00 committed by GitHub
commit d7069985e5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 12 additions and 8 deletions

View File

@ -26,7 +26,6 @@ jobs:
name: Prepare
run: |
rm -rf ./data/buildx/*
rm -rf ./_vendor/github.com/docker/buildx
if [ -n "${{ github.event.inputs.tag }}" ]; then
echo "RELEASE_NAME=${{ github.event.inputs.tag }}" >> $GITHUB_ENV
else
@ -41,6 +40,7 @@ jobs:
with:
source: ${{ github.server_url }}/${{ github.repository }}.git#${{ env.RELEASE_NAME }}
targets: update-docs
provenance: false
set: |
*.output=/tmp/buildx-docs
env:
@ -51,11 +51,10 @@ jobs:
cp /tmp/buildx-docs/out/reference/*.yaml ./data/buildx/
-
name: Update vendor
uses: docker/bake-action@v4
with:
targets: vendor
set: |
vendor.args.MODULE=github.com/docker/buildx@${{ env.RELEASE_NAME }}
run: |
make vendor
env:
VENDOR_MODULE: github.com/docker/buildx@${{ env.RELEASE_NAME }}
-
name: Create PR on docs repo
uses: peter-evans/create-pull-request@a4f52f8033a6168103c2538976c07b467e8163bc

View File

@ -37,6 +37,7 @@ jobs:
uses: docker/bake-action@v4
with:
targets: update-docs
provenance: false
set: |
*.output=/tmp/buildx-docs
*.cache-from=type=gha,scope=docs-yaml

View File

@ -19,8 +19,6 @@ on:
jobs:
validate:
runs-on: ubuntu-22.04
env:
GOLANGCI_LINT_MULTIPLATFORM: 1
strategy:
fail-fast: false
matrix:
@ -30,6 +28,12 @@ jobs:
- validate-docs
- validate-generated-files
steps:
-
name: Prepare
run: |
if [ "$GITHUB_REPOSITORY" = "docker/buildx" ]; then
echo "GOLANGCI_LINT_MULTIPLATFORM=1" >> $GITHUB_ENV
fi
-
name: Checkout
uses: actions/checkout@v4