Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create bump-bundles.yml #4

Closed
wants to merge 16 commits into from
73 changes: 73 additions & 0 deletions .github/workflows/bump-bundles.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: Update Bundle Dependencies

on:
schedule:
- cron: '0 0 * * *'
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
list-bundles:
runs-on: ubuntu-latest
outputs:
bundles: ${{ steps.list-bundles.outputs.bundles }}
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 0
ref: master
- name: List all bundles
id: list-bundles
run: |
directories=($(ls -d ui/*/ ua/*/ ds/*/ build/*/ apitools/*/ e4tools/*/))
directories=("${directories[@]%/}")
json_array=()
for dir in "${directories[@]}"; do
if [ -e ${dir}/META-INF/MANIFEST.MF ]
then
json_array+=("\"$dir\"")
fi
done
json_elements=$(IFS=,; echo "${json_array[*]}")
json_output="{ \"bundles\": [$json_elements] }"
echo "bundles=$json_output" | tee -a "$GITHUB_OUTPUT"

update-bundles:
runs-on: ubuntu-latest
if: always()
needs: list-bundles
strategy:
matrix: ${{ fromJson(needs.list-bundles.outputs.bundles) }}
max-parallel: 2
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 0
ref: master
- name: Set up Maven
uses: stCarolas/setup-maven@d6af6abeda15e98926a57b5aa970a96bb37f97d1 # v5
with:
maven-version: 3.9.7
- name: Set up JDK
uses: actions/setup-java@6a0805fcefea3d4657a47ac4c165951e33482018 # v4.2.2
with:
java-version: '17'
distribution: 'temurin'
cache: maven
- name: Update Bundle ${{ matrix.bundles }}
working-directory: ${{ matrix.bundles }}
run: >-
mvn -B org.eclipse.tycho.extras:tycho-version-bump-plugin:5.0.0-SNAPSHOT:update-manifest
-Dtycho.version=5.0.0-SNAPSHOT
- name: Create Pull Request
uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c # v6.1.0
with:
commit-message: Bump Dependencies of ${{ matrix.bundles }}
branch: update-mf/${{ matrix.bundles }}
title: Bundle Dependencies Version Bumps for ${{ matrix.bundles }}
body: Please review the changes and merge if appropriate, or cherry pick individual updates.
delete-branch: true
draft: false
add-paths: |
**/*.MF
Loading