Merge pull request #79 from relativityone/update-glog #191
This file contains 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: [ relativity-main ] | |
pull_request: | |
branches: [ relativity-main ] | |
jobs: | |
build-spark-operator: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version-file: "go.mod" | |
- name: Run gofmt check | |
run: make fmt-check | |
- name: Run static analysis | |
run: make static-analysis | |
- name: Run unit tests | |
run: make unit-test | |
- name: Azure login | |
uses: Azure/login@v1 | |
with: | |
creds: ${{ secrets.AZURE_CREDENTIALS }} | |
- name: Get secrets | |
uses: Azure/get-keyvault-secrets@v1 | |
with: | |
keyvault: ${{ secrets.KEY_VAULT }} | |
secrets: "acrUsername, acrPassword" | |
id: kv | |
- name: Login to docker | |
uses: docker/login-action@v1 | |
with: | |
registry: ${{ secrets.REGISTRY }} | |
username: ${{ steps.kv.outputs.acrUsername }} | |
password: ${{ steps.kv.outputs.acrPassword }} | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Build image | |
uses: docker/build-push-action@v2 | |
with: | |
tags: spark-operator:local | |
outputs: 'type=docker,dest=/tmp/base-image.tar' | |
build-args: | | |
SPARK_IMAGE=${{ secrets.BASE_IMAGE }}:v1.9.3 | |
- name: Cache image | |
uses: actions/upload-artifact@v4 | |
with: | |
name: base-image | |
path: /tmp/base-image.tar |