Skip to content

Commit

Permalink
Improved action.
Browse files Browse the repository at this point in the history
  • Loading branch information
lreimer committed Dec 2, 2024
1 parent 31fd4e4 commit bfbca92
Showing 1 changed file with 11 additions and 18 deletions.
29 changes: 11 additions & 18 deletions .github/workflows/openai-chat-service.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,32 @@ 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 <account>/<repo>
IMAGE_NAME: ${{ github.repository }}-openai-chat-service
# required for OpenAI API access
QUARKUS_LANGCHAIN4J_OPENAI_API_KEY: ${{secrets.QUARKUS_LANGCHAIN4J_OPENAI_API_KEY}}

jobs:
build-and-publish:

runs-on: ubuntu-latest
permissions:
contents: read
contents: write

steps:
- uses: actions/checkout@v4
Expand All @@ -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
Expand Down

0 comments on commit bfbca92

Please sign in to comment.