chore: fix openapi paths #3
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: CICD | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- '*' | |
workflow_dispatch: # allow this workflow to be called by other workflows | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} | |
jobs: | |
openapi-lint-checks: | |
runs-on: ubuntu-latest | |
name: OpenAPI Linter | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: v3 Lint | |
run: npx @redocly/cli lint api/v3/openapi.yaml | |
- name: v4 Lint | |
run: npx @redocly/cli lint api/v4/openapi.yaml | |
openapi-validation: | |
runs-on: ubuntu-latest | |
name: Validate OpenAPI Spec | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Validate OpenAPI V3 definition | |
uses: char0n/swagger-editor-validate@v1 | |
with: | |
definition-file: api/v3/openapi.yaml | |
- name: Validate OpenAPI V4 definition | |
uses: char0n/swagger-editor-validate@v1 | |
with: | |
definition-file: api/v4/openapi.yaml | |
deploy-package: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
name: Deploy | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up Java 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
server-id: RHEcosystemAppEng-github | |
- name: Build with Maven | |
run: mvn -B package --file exhort-java-api/pom.xml | |
- name: Publish to GitHub Packages Apache Maven | |
run: mvn -B deploy --file exhort-java-api/pom.xml | |
env: | |
GITHUB_TOKEN: ${{ github.token }} |