Skip to content

Update Reports

Update Reports #7

name: Update Reports
on:
schedule:
- cron: "50 20 * * *"
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Update Reports
run: ./bin/update-reproducibility-summary.sh update
- name: Commit Push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config --local user.email "[email protected]"
git config --local user.name "Reproducible Central CI"
git add -A
git commit -m "nightly update of content"
git push
- name: Add PRs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
for line in `cat tmp/add-ok.txt`
do
echo "$line"
previousBuildspec="$(echo $line | cut -d ':' -f 1)"
nextVersion="$(echo $line | cut -d ':' -f 2)"
. ${previousBuildspec}
dir=`dirname ${previousBuildspec}`
file=`basename ${previousBuildspec} -${version}.buildspec`
nextBuildspec=${dir}/${file}-${nextVersion}.buildspec
if [ $(git branch --list $artifactId-$nextVersion | wc -l) -eq 0 ]
then
bin/add-new-release.sh $previousBuildspec $nextVersion
git checkout -b $artifactId-$nextVersion
git add ${nextBuildspec}
git commit -m "add ${artifactId} ${nextVersion}" -m "" -m "https://github.com/jvm-repo-rebuild/reproducible-central/blob/master/${dir}/README.md"
git push --set-upstream origin $artifactId-$nextVersion
gh pr create --fill --head $artifactId-$nextVersion
git switch master
fi
done