Skip to content

chore(main): release 0.18.3 #70

chore(main): release 0.18.3

chore(main): release 0.18.3 #70

Workflow file for this run

name: CI
on:
pull_request:
push:
branches: [main]
workflow_dispatch:
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
permissions:
contents: read
packages: read
pull-requests: read
env:
GITHUB_ACTOR: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
jvm-ci:
name: JVM CI
uses: JorisJonkers-dev/github-workflows/.github/workflows/jvm-ci.yml@v0.10.2
with:
gradle-command: ./gradlew
lint-gradle-args: :api:detektMain :api:detektTest :api:detektIntegrationTest :api:ktlintCheck
test-gradle-args: :api:test :api:integrationTest :api:jacocoTestCoverageVerification :api:exportOpenApiSpec
secrets:
packages-token: ${{ secrets.GITHUB_TOKEN }}
contract:
name: API Contract
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: actions/setup-java@v5
with:
distribution: temurin
java-version: '21'
- uses: gradle/actions/setup-gradle@v6
- name: Export OpenAPI spec
run: ./gradlew :api:exportOpenApiSpec --no-daemon
- name: Check committed OpenAPI spec
run: git diff --exit-code -- client-spec/openapi/agents-api.json
- uses: JorisJonkers-dev/api-contract-checks@v1.0.0
with:
profile: agents-api
spec-path: client-spec/openapi/agents-api.json
export-command: ./gradlew :api:exportOpenApiSpec --no-daemon
guidance: ./gradlew :api:exportOpenApiSpec
- name: Fetch base OpenAPI spec
run: git fetch --depth=1 origin ${{ github.base_ref || 'main' }}
- uses: oasdiff/oasdiff-action/breaking@v0
with:
base: origin/${{ github.base_ref || 'main' }}:client-spec/openapi/agents-api.json
revision: HEAD:client-spec/openapi/agents-api.json
fail-on: WARN
client-dry-run:
name: Client Dry Run
uses: JorisJonkers-dev/github-workflows/.github/workflows/publish-api-clients.yml@v0.10.2
permissions:
contents: read
packages: write
id-token: write
with:
spec-path: client-spec/openapi/agents-api-client.json
api-name: agents-api
version: 0.0.0-ci.${{ github.run_number }}.${{ github.run_attempt }}
ts-package: '@jorisjonkers-dev/agents-api-client'
maven-group: dev.jorisjonkers
java-artifact: agents-api-client-java
kotlin-artifact: agents-api-client-kotlin
openapi-client-gradle-version: '0.3.1'
dry-run: true
secrets:
packages-token: ${{ secrets.GITHUB_TOKEN }}
node-auth-token: ${{ secrets.GITHUB_TOKEN }}
docker-dry-run:
name: Docker Dry Run
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: docker/setup-buildx-action@v4
- name: Build agents-api image
uses: docker/build-push-action@v7
with:
context: .
file: Dockerfile
push: false
tags: ghcr.io/jorisjonkers-dev/agents-api/agents-api:${{ github.sha }}
secrets: |
github_token=${{ secrets.GITHUB_TOKEN }}
github_actor=${{ github.actor }}
build-args: |
GIT_SHA=${{ github.sha }}
deploy-bundle:
name: Deploy Bundle
runs-on: ubuntu-latest
permissions:
contents: read
packages: read
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v6
with:
repository: JorisJonkers-dev/github-workflows
ref: v0.8.0
path: .github-workflows
persist-credentials: false
- name: Write deploy image lock
env:
IMAGE_REF: ghcr.io/jorisjonkers-dev/agents-api/agents-api:${{ github.sha }}
run: |
set -euo pipefail
cat > "$RUNNER_TEMP/agents-api-images.json" <<JSON
{
"agents-api": "$IMAGE_REF",
"agents-api-ws": "$IMAGE_REF"
}
JSON
- name: Validate deploy bundle
uses: ./.github-workflows/actions/deploy-bundle
with:
deploy-dir: deploy
images: ${{ runner.temp }}/agents-api-images.json
package-version: 0.9.0
version: 0.0.0-ci.${{ github.run_number }}.${{ github.run_attempt }}
node-auth-token: ${{ secrets.GITHUB_TOKEN }}
migration-guard:
name: Migration Guard
uses: JorisJonkers-dev/github-workflows/.github/workflows/migration-guard.yml@v0.10.2
with:
migration-regex: '^api/src/main/resources/db/migration/V[0-9][^/]*\.sql$'
scope-regex: '^(api)/.*'
pipeline-complete:
name: Pipeline Complete
runs-on: ubuntu-latest
needs:
[
jvm-ci,
contract,
client-dry-run,
docker-dry-run,
deploy-bundle,
migration-guard,
]
if: ${{ always() }}
steps:
- uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}