-
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.
Add a job to build the pipelines and publish them
Signed-off-by: cmoulliard <[email protected]>
- Loading branch information
1 parent
6c6823f
commit bc757b6
Showing
2 changed files
with
56 additions
and
0 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,53 @@ | ||
# Publish Pipelines generated when project is tagged | ||
name: Publish Pipelines generated | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
tags: | ||
- "v*.*.*" | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write # release changes require contents write | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: temurin | ||
java-version: 17 | ||
cache: maven | ||
|
||
- name: Build with Maven | ||
run: mvn -B clean package | ||
|
||
- name: Run the builder | ||
run: | | ||
cat <<EOF > cfg.yml | ||
type: tekton | ||
name: example | ||
namespace: | ||
job: | ||
domain: example | ||
resourceType: Pipeline | ||
name: pipeline-1 # name of the pipeline to be created | ||
description: Simple example of a Tekton pipeline echoing a message | ||
EOF | ||
java -jar target/quarkus-app/quarkus-run.jar -o out/flows -c cfg.yml | ||
- name: Check Pipeline generated | ||
run: cat out/flows/example/pipeline.yaml | ||
|
||
- name: Release | ||
uses: softprops/action-gh-release@v2 | ||
if: startsWith(github.ref, 'refs/tags/') | ||
with: | ||
files: | | ||
**/*.yaml |
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