fixes OpenAPI spec security definitions #340
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: "Lint" | |
on: | |
push: | |
branches: | |
- "!dependabot/*" | |
- "*" | |
pull_request: | |
branches: | |
- "*" | |
jobs: | |
lint: | |
name: "Lint & Publish Draft/Branch" | |
runs-on: "ubuntu-latest" | |
steps: | |
- uses: "actions/checkout@v3" | |
- uses: "authzed/actions/yaml-lint@main" | |
- uses: "bufbuild/[email protected]" | |
with: | |
version: "1.30.0" | |
- uses: "bufbuild/buf-lint-action@v1" | |
- uses: "bufbuild/buf-breaking-action@v1" | |
if: "github.event_name == 'pull_request'" | |
env: | |
BUF_INPUT_HTTPS_USERNAME: "${{ github.actor }}" | |
BUF_INPUT_HTTPS_PASSWORD: "${{ github.token }}" | |
with: | |
against: "https://github.com/authzed/api.git#branch=main" | |
buf_token: "${{ secrets.BUF_REGISTRY_TOKEN }}" | |
- name: "Push to BSR" | |
if: "github.event_name == 'push' && github.ref == 'refs/heads/main'" | |
shell: "bash" | |
env: | |
BUF_TOKEN: "${{ secrets.BUF_REGISTRY_TOKEN }}" | |
run: "buf push --draft ${{ github.sha }}" | |
- name: "Push to BSR a Draft" | |
if: "github.event_name == 'push' && github.ref == 'refs/heads/main'" | |
shell: "bash" | |
env: | |
BUF_TOKEN: "${{ secrets.BUF_REGISTRY_TOKEN }}" | |
run: "buf push --draft ${{ github.sha }}" | |
- name: "Push to BSR a Branch" | |
if: "github.event_name == 'push' && github.ref != 'refs/heads/main'" | |
shell: "bash" | |
env: | |
BUF_TOKEN: "${{ secrets.BUF_REGISTRY_TOKEN }}" | |
run: "buf push --branch ${{ github.sha }}" |