Skip to content

add headers and query params #7

add headers and query params

add headers and query params #7

Workflow file for this run

name: Publish docker image
on:
push:
tags:
- v[0-9]+.*
workflow_dispatch:
env:
REGISTRY: ghcr.io
IMAGE_NAME: JavaAIDev/openapi-mcp-server
jobs:
push-image:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
attestations: write
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: "21"
distribution: "temurin"
cache: gradle
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Build with Gradle
run: ./gradlew build -x test
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: get docker image tag
id: get-tag
run: echo "TAG=$(echo ${{ github.ref_name }} | cut -c2-)" >> $GITHUB_ENV
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=raw,value=${{ env.TAG }}
type=raw,value=latest
- name: Build and push Docker image
id: push
uses: docker/build-push-action@v6
with:
context: .
file: ./distribution/Dockerfile-jvm
push: true
platforms: linux/amd64, linux/arm64, linux/arm/v7
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
provenance: true
sbom: true
- name: Create a Github Release
uses: ncipollo/release-action@v1
with:
token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
body: ${{ github.ref_name }}
artifacts: "build/libs/openapi-mcp-server-*-all.jar"
generateReleaseNotes: true