From bfbca9200a65a38478b1ece5697ea6a1cdd1ee04 Mon Sep 17 00:00:00 2001 From: "M.-Leander Reimer" Date: Mon, 2 Dec 2024 22:03:04 +0100 Subject: [PATCH] Improved action. --- .github/workflows/openai-chat-service.yml | 29 +++++++++-------------- 1 file changed, 11 insertions(+), 18 deletions(-) diff --git a/.github/workflows/openai-chat-service.yml b/.github/workflows/openai-chat-service.yml index 43edfc7..29de012 100644 --- a/.github/workflows/openai-chat-service.yml +++ b/.github/workflows/openai-chat-service.yml @@ -11,14 +11,24 @@ on: workflow_dispatch: push: branches: [ "main" ] + # Publish semver tags as releases. + tags: [ 'v*.*.*' ] + paths: [openai-chat-service/*] + pull_request: branches: [ "main" ] + paths: [openai-chat-service/*] defaults: run: working-directory: ./openai-chat-service env: + # Use docker.io for Docker Hub if empty + REGISTRY: ghcr.io + # github.repository as / + IMAGE_NAME: ${{ github.repository }}-openai-chat-service + # required for OpenAI API access QUARKUS_LANGCHAIN4J_OPENAI_API_KEY: ${{secrets.QUARKUS_LANGCHAIN4J_OPENAI_API_KEY}} jobs: @@ -26,7 +36,7 @@ jobs: runs-on: ubuntu-latest permissions: - contents: read + contents: write steps: - uses: actions/checkout@v4 @@ -42,23 +52,6 @@ jobs: - name: Build with Gradle Wrapper run: ./gradlew build - dependency-submission: - - runs-on: ubuntu-latest - permissions: - contents: write - - steps: - - uses: actions/checkout@v4 - - name: Set up JDK 21 - uses: actions/setup-java@v4 - with: - java-version: '21' - distribution: 'temurin' - - - name: Setup Gradle - uses: gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0 - # Generates and submits a dependency graph, enabling Dependabot Alerts for all project dependencies. # See: https://github.com/gradle/actions/blob/main/dependency-submission/README.md - name: Generate and submit dependency graph