diff --git a/.github/workflows/publish-pipelines.yml b/.github/workflows/publish-pipelines.yml new file mode 100644 index 0000000..08712a9 --- /dev/null +++ b/.github/workflows/publish-pipelines.yml @@ -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 < 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 \ No newline at end of file diff --git a/README.md b/README.md index dd7c8cf..c6ca50c 100644 --- a/README.md +++ b/README.md @@ -92,6 +92,8 @@ job: 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 ``` Resource generated: ```yaml @@ -137,6 +139,7 @@ job: name: pack-builder-push description: "This Pipeline builds a builder image using the pack CLI." EOF + java -jar target/quarkus-app/quarkus-run.jar -o out/flows -c cfg.yml ``` Resource generated: