-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test extracting quarkus building as composite action
- Loading branch information
1 parent
be670c2
commit 9b65241
Showing
3 changed files
with
81 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: "Build & Deploy Quarkus to k8s" | ||
inputs: | ||
github-token: | ||
required: true | ||
kube-config: | ||
required: true | ||
|
||
|
||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Set up JDK 21 | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '21' | ||
|
||
- name: Setup Gradle | ||
uses: gradle/actions/setup-gradle@v3 | ||
|
||
- name: assemble | ||
run: ./gradlew assemble | ||
|
||
- name: build container | ||
run: ./gradlew assemble -Dquarkus.container-image.build=true | ||
|
||
- uses: azure/k8s-set-context@v3 | ||
with: | ||
method: kubeconfig | ||
kubeconfig: '${{ inputs.kube-config }}' | ||
|
||
- name: push & deploy to k8s | ||
run: | | ||
./gradlew assemble \ | ||
-Dquarkus.kubernetes.deploy=true \ | ||
-Dquarkus.container-image.group=${{ github.repository_owner }}/${{ github.event.repository.name }} \ | ||
-Dquarkus.container-image.registry=ghcr.io \ | ||
-Dquarkus.container-image.additional-tags=${{ github.sha }} \ | ||
-Dquarkus.container-image.username=${{ github.actor }} \ | ||
-Dquarkus.container-image.password=${{ inputs.github-token }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,8 +12,6 @@ inputs: | |
default: app.kubernetes.io/name | ||
|
||
|
||
|
||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters