Skip to content

Create bump-bundles.yml #10

Create bump-bundles.yml

Create bump-bundles.yml #10

Workflow file for this run

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:
- name: Update Bundle ${{ matrix.bundles }}
run: echo "Hello World..."