.ci/project-dependencies.yaml: use branch 7.x of kie-jpmml-integratio… #109
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
name: Build Chain Generate Files | |
on: | |
push: | |
branches: | |
- main | |
- 7.67.x | |
- 7.67.x-blue | |
paths: | |
- '.ci/pull-request-config.yaml' | |
- '.ci/project-dependencies.yaml' | |
jobs: | |
build-chain: | |
runs-on: ubuntu-latest | |
name: File Generation | |
steps: | |
- id: files_changes | |
uses: jitterbit/get-changed-files@v1 | |
- id: build_chain_info | |
run: | | |
files_string="" | |
for changed_file in ${{ steps.files_changes.outputs.all }}; do | |
files_string="${files_string} | |
- ${changed_file}" | |
echo "Changed file ${changed_file}." | |
done | |
files_string="${files_string//'%'/'%25'}" | |
files_string="${files_string//$'\n'/'%0A'}" | |
files_string="${files_string//$'\r'/'%0D'}" | |
echo "::set-output name=files_string::${files_string}" | |
echo "::set-output name=commitURL::${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/commit/${GITHUB_SHA}" | |
echo "::set-output name=jobURL::${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}" | |
- uses: actions/checkout@v4 | |
- name: Checkout BC Files Generator repo | |
uses: actions/checkout@v4 | |
with: | |
repository: kiegroup/build-chain-files-generator | |
path: build-chain-files-generator | |
lfs: true | |
- name: Build BC Files Generator | |
run: npm install --prefix build-chain-files-generator | |
- name: Image Generation | |
run: ./build-chain-files-generator/bin/generator-cli.js -df .ci/pull-request-config.yaml -o ./docs/project-dependencies-hierarchy.png image | |
- name: Repository List Generation | |
run: ./build-chain-files-generator/bin/generator-cli.js -df .ci/pull-request-config.yaml -o ./script/repository-list.txt repository-list | |
- name: Optaplanner Repository List Generation | |
run: ./build-chain-files-generator/bin/generator-cli.js -df .ci/pull-request-config.yaml -o ./script/branched-7-repository-list.txt repository-list -include "@main:7.x" | |
- name: Add Changes | |
run: git add ./docs/project-dependencies-hierarchy.png ./script/repository-list.txt ./script/branched-7-repository-list.txt | |
- name: Archive artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: generated-files | |
path: | | |
**/project-dependencies-hierarchy.png | |
**/repository-list.txt | |
**/branched-7-repository-list.txt | |
- name: Set branch name | |
run: echo "BRANCH_NAME_FLOW=generate_files_$(date +'%Y%m%dT%H%M%S')" >> $GITHUB_ENV | |
- name: Extract target branch name | |
run: echo "BRANCH_NAME_FLOW_TARGET=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_ENV | |
- name: Create Pull Request | |
id: cpr | |
uses: peter-evans/create-pull-request@v5 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
commit-message: Update build chain files | |
committer: GitHub <noreply@github.com> | |
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> | |
signoff: false | |
branch: ${{ env.BRANCH_NAME_FLOW }} | |
delete-branch: true | |
title: "[${{ env.BRANCH_NAME_FLOW_TARGET }}][Build Chain] Update build chain and repository-list files." | |
body: | | |
# Update Report | |
**Pull Request created by:** ${{ steps.build_chain_info.outputs.jobURL }} | |
These files where changed by ${{ steps.build_chain_info.outputs.commitURL }} | |
${{ steps.build_chain_info.outputs.files_string }} | |
reviewers: mareknovotny | |
draft: false | |
- name: Check outputs | |
run: | | |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}" | |
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}" |