ci: add apilinter #33
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: 'OPI Storage API CI' | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ main ] | |
paths: | |
- 'storage/v1alpha1/**' | |
- 'storage/Makefile' | |
- '.github/workflows/storage.yml' | |
pull_request: | |
branches: [ main ] | |
paths: | |
- 'storage/v1alpha1/**' | |
- 'storage/Makefile' | |
- '.github/workflows/storage.yml' | |
concurrency: | |
# if workflow for PR or push is already running stop it, and start new one | |
group: storage-api-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build-storage-protobuf: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
# Workaround: https://github.com/docker/build-push-action/issues/461 | |
- name: Setup Docker buildx | |
uses: docker/setup-buildx-action@7703e82fbced3d0c9eec08dff4429c023a5fd9a9 | |
- name: Build protobufs | |
run: make | |
working-directory: storage | |
- name: Check uncomitted auto generated protobufs | |
run: git diff --exit-code | |
working-directory: storage | |
- name: Upload build artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
path: storage/v1/gen/go/*.pb.go | |
retention-days: 1 |