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

View File

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

View File

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