fix passing environment variables to image pushers (#236) #746
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| types: | |
| - opened | |
| - synchronize | |
| env: | |
| BAZEL_STARTUP_FLAGS: --bazelrc=${{ github.workspace }}/.github/github.bazelrc | |
| jobs: | |
| ci: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| include: | |
| - os: macos-latest | |
| - os: ubuntu-22.04 | |
| - os: windows-latest | |
| steps: | |
| # Checkout the code | |
| - uses: actions/checkout@v4 | |
| - uses: bazel-contrib/setup-bazel@0.14.0 | |
| with: | |
| bazelisk-cache: true | |
| disk-cache: ${{ github.workflow }} | |
| repository-cache: true | |
| - name: Setup Bazelrc (Windows) | |
| run: | | |
| echo "startup --output_user_root=C:/bzl" > ./user.bazelrc | |
| if: startswith(runner.os, 'Windows') | |
| - name: Setup Bazelrc | |
| run: | | |
| echo "common --keep_going" >> ./user.bazelrc | |
| # Build and Test the code | |
| - name: Test (Unix) | |
| run: bazel ${BAZEL_STARTUP_FLAGS[@]} test //... | |
| if: startswith(runner.os, 'Windows') != true | |
| - name: Test (Windows) | |
| run: bazel $env:BAZEL_STARTUP_FLAGS test //... | |
| if: startswith(runner.os, 'Windows') | |
| ci-aspects: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| include: | |
| - os: macos-14 | |
| - os: ubuntu-22.04 | |
| - os: ubuntu-24.04-arm | |
| - os: windows-latest | |
| steps: | |
| # Checkout the code | |
| - uses: actions/checkout@v4 | |
| - uses: bazel-contrib/setup-bazel@0.14.0 | |
| with: | |
| bazelisk-cache: true | |
| disk-cache: ${{ github.workflow }} | |
| repository-cache: true | |
| - name: Setup Bazelrc (Windows) | |
| run: | | |
| echo "startup --output_user_root=C:/bzl" > ./user.bazelrc | |
| if: startswith(runner.os, 'Windows') | |
| - name: Setup Bazelrc | |
| run: | | |
| echo "common --config=strict" >> ./user.bazelrc | |
| echo "common --keep_going" >> ./user.bazelrc | |
| # Build and Test the code | |
| - name: Test (Unix) | |
| run: bazel ${BAZEL_STARTUP_FLAGS[@]} test //... | |
| if: startswith(runner.os, 'Windows') != true | |
| - name: Test (Windows) | |
| run: bazel $env:BAZEL_STARTUP_FLAGS test //... | |
| if: startswith(runner.os, 'Windows') | |
| ci-min-bazel: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| include: | |
| - os: macos-14 | |
| - os: ubuntu-22.04 | |
| - os: ubuntu-24.04-arm | |
| - os: windows-latest | |
| steps: | |
| # Checkout the code | |
| - uses: actions/checkout@v4 | |
| - uses: bazel-contrib/setup-bazel@0.14.0 | |
| with: | |
| bazelisk-cache: true | |
| disk-cache: ${{ github.workflow }} | |
| repository-cache: true | |
| - name: Setup Bazelrc (Windows) | |
| run: | | |
| echo "startup --output_user_root=C:/bzl" > ./user.bazelrc | |
| if: startswith(runner.os, 'Windows') | |
| - name: Setup Bazelrc | |
| run: | | |
| echo "common --config=strict" >> ./user.bazelrc | |
| echo "common --keep_going" >> ./user.bazelrc | |
| # Build and Test the code | |
| - name: Test (Unix) | |
| run: bazel ${BAZEL_STARTUP_FLAGS[@]} test //... | |
| if: startswith(runner.os, 'Windows') != true | |
| env: | |
| USE_BAZEL_VERSION: 7.x | |
| - name: Test (Windows) | |
| run: bazel $env:BAZEL_STARTUP_FLAGS test //... | |
| if: startswith(runner.os, 'Windows') | |
| env: | |
| USE_BAZEL_VERSION: 7.x | |
| ci-buildifier: | |
| runs-on: ubuntu-latest | |
| steps: | |
| # Checkout the code | |
| - uses: actions/checkout@v4 | |
| - name: Buildifier | |
| run: | | |
| wget "https://github.com/bazelbuild/buildtools/releases/download/v${BUILDIFIER_VERSION}/buildifier-linux-amd64" -O buildifier | |
| chmod +x ./buildifier | |
| ./buildifier -lint=warn -mode=check -warnings=all -r ${{ github.workspace }} | |
| rm ./buildifier | |
| env: | |
| BUILDIFIER_VERSION: 8.0.2 | |
| ci-gofmt: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: Jerome1337/gofmt-action@v1.0.5 | |
| with: | |
| gofmt-flags: -e -d |