Skip to content

Commit

Permalink
Fix GitHub release workflow (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
raminqaf authored Dec 19, 2024
1 parent 7e6afca commit 9832327
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 9 deletions.
37 changes: 29 additions & 8 deletions .github/workflows/build-and-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,15 @@ on:
env:
java-version: 21
gradle-version: 8.4
gradle-cache: true
gradle-cache-read-only: true
gradle-refresh-dependencies: false
working-directory: "./word-count/code"

jobs:
build-and-test:
name: Build, Test and Assess code quality
uses: bakdata/ci-templates/.github/workflows/[email protected].3
uses: bakdata/ci-templates/.github/workflows/[email protected].4
with:
java-version: 21
gradle-version: 8.4
Expand Down Expand Up @@ -44,25 +47,43 @@ jobs:
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push sentence producer image
uses: bakdata/ci-templates/actions/[email protected].3
uses: bakdata/ci-templates/actions/[email protected].4
with:
full-image-name: bakdata/kpops-demo-sentence-producer
class: com.bakdata.kpops.examples.SentenceProducer
java-version: ${{ env.java-version }}
gradle-version: ${{ env.gradle-version }}
gradle-cache: true
gradle-cache-read-only: true
gradle-refresh-dependencies: false
gradle-cache-read-only: ${{ env.gradle-cache-read-only }}
gradle-refresh-dependencies: ${{ env.gradle-refresh-dependencies }}
working-directory: ${{ env.working-directory }}

- name: Build and push word count image
uses: bakdata/ci-templates/actions/[email protected].3
uses: bakdata/ci-templates/actions/[email protected].4
with:
full-image-name: bakdata/kpops-demo-word-count-app
class: com.bakdata.kpops.examples.WordCountApplication
java-version: ${{ env.java-version }}
gradle-version: ${{ env.gradle-version }}
gradle-cache: true
gradle-cache-read-only: true
gradle-refresh-dependencies: false
gradle-cache: ${{ env.gradle-cache }}
gradle-cache-read-only: ${{ env.gradle-cache-read-only }}
gradle-refresh-dependencies: ${{ env.gradle-refresh-dependencies }}
working-directory: ${{ env.working-directory }}

release:
name: Create Github release
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-22.04
needs: [build-and-test, build-jib]

steps:
- name: Release on Github
uses: bakdata/ci-templates/actions/[email protected]
with:
github-token: ${{ secrets.GH_TOKEN }}
java-version: ${{ env.java-version }}
gradle-version: ${{ env.gradle-version }}
gradle-cache: ${{ env.gradle-cache }}
gradle-cache-read-only: ${{ env.gradle-cache-read-only }}
gradle-refresh-dependencies: ${{ env.gradle-refresh-dependencies }}
working-directory: ${{ env.working-directory }}
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ on:
jobs:
java-gradle-release:
name: Java Gradle Release
uses: bakdata/ci-templates/.github/workflows/java-gradle-release.yaml@1.43.0
uses: bakdata/ci-templates/.github/workflows/java-gradle-release.yaml@1.50.4
with:
java-version: 21
release-type: "${{ inputs.release-type }}"
Expand Down

0 comments on commit 9832327

Please sign in to comment.