Skip to content

Add missing runs-on: ubuntu-latest #20

Add missing runs-on: ubuntu-latest

Add missing runs-on: ubuntu-latest #20

# Publish Pipelines generated when project is tagged
name: Publish Pipelines generated
on:
workflow_dispatch:
push:
branches:
- main
jobs:
generate:
runs-on: ubuntu-latest
permissions:
contents: write # release changes require contents write
strategy:
matrix:
config:
- tekton/simple-job-embedded-script-cfg.yaml
- tekton/simple-job-fetch-script-cfg.yaml
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 application
run: |
java -jar target/quarkus-app/quarkus-run.jar -o generated -c configurations/${{ matrix.config }}
- name: Check Pipeline generated
run: |
ls -la generated/example
#- name: Push the README file with snippet
# run: |
# git config user.name "${{ github.actor }}"
# git config user.email "${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com"
#
# set +e
# git add generated/*
# git commit -m "New \"pipelines\" yaml file(s) generated"
# git push
#- name: Get doc files that have changed
# id: changed-files-yaml
# uses: tj-actions/changed-files@v44
# with:
# files_yaml: |
# doc:
# - '**.md'
- name: Markdown Code Embed
continue-on-error: true
#if: steps.changed-files-yaml.outputs.doc_any_changed == 'true'
run: |
#!/usr/bin/env bash
set -e
git clone https://github.com/ippie52/markdown_code_embed.git
python markdown_code_embed/mdce.py -b -f README.md
upload-repo:
needs: [generate]
runs-on: ubuntu-latest
steps:
- name: Upload repository as artifact
uses: actions/upload-artifact@v3
with:
name: repo-artifact
path: .
create-pr:
needs: [upload-repo]
runs-on: ubuntu-latest
permissions:
contents: write # release changes require contents write
steps:
- name: Download repository artifact
uses: actions/download-artifact@v3
with:
name: repo-artifact
path: .
- name: Get current date
id: date
#if: steps.changed-files-yaml.outputs.doc_any_changed == 'true'
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
- name: Create pull request for the updated README file
#if: steps.changed-files-yaml.outputs.doc_any_changed == 'true'
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: new-generated-pipelines-${{ steps.date.outputs.date }}
title: "New resources generated and README changed - ${{ steps.date.outputs.date }}"
body: |
Pull request for New resources generated and README changed.
base: main
labels: |
documentation