Last active
March 23, 2022 14:10
-
-
Save zacker330/ae128a80ce992fb482444458fe548c4f to your computer and use it in GitHub Desktop.
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: pipeline | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set env | |
run: echo "GITHUB_SHA_SHORT=$(echo $GITHUB_SHA | cut -c 1-10)" >> $GITHUB_ENV | |
- name: Test | |
run: echo $GITHUB_SHA_SHORT | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v2 | |
with: | |
java-version: '11' | |
distribution: 'adopt' | |
- name: Mount bazel cache | |
uses: actions/cache@v1 | |
with: | |
path: "/home/runner/.cache/bazel" | |
key: bazel | |
- name: Install bazelisk | |
run: | | |
curl -LO "https://github.com/bazelbuild/bazelisk/releases/download/v1.1.0/bazelisk-linux-amd64" | |
mkdir -p "${GITHUB_WORKSPACE}/bin/" | |
mv bazelisk-linux-amd64 "${GITHUB_WORKSPACE}/bin/bazel" | |
chmod +x "${GITHUB_WORKSPACE}/bin/bazel" | |
- name: Build | |
run: | | |
"${GITHUB_WORKSPACE}/bin/bazel" build //... | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment