Synchronize with upstream repositories #1623
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: Synchronize with upstream repositories | |
on: | |
schedule: | |
- cron: '* 0 * * *' | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
env: | |
ICE_HOME: /opt/ice-3.6.5 # location where Ice is installed | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Ice Java and Python binding | |
uses: ome/action-ice@v3 | |
- name: Set up configuration | |
run: | | |
git config --global user.email github-actions@github.com | |
git config --global user.name github-actions | |
- name: Checkout repositories | |
run: | | |
cd .. | |
WORKSPACE=$(pwd) | |
echo "space="${WORKSPACE} >> $GITHUB_ENV | |
git clone https://github.com/ome/openmicroscopy OMERO.server | |
git clone https://github.com/ome/omeroweb-install | |
git clone https://github.com/ome/omero-install | |
- name: Build OMERO.server | |
run: | | |
cd $space/OMERO.server | |
./build.py | |
- name: Update documentation | |
run: | | |
WORKSPACE=$space BUILD=false SUFFIX=/dist bash autogen_omero.sh | |
- name: Find modified files | |
id: upstream_repo | |
run: | | |
files=$(git diff --name-only) | |
value="Changes from upstream repositories: " | |
if [[ "openmicroscopy" =~ .*"$file".* ]]; then | |
value="${value} openmicroscopy" | |
elif [[ "omero-install" =~ .*"$file".* ]]; then | |
value="${value} omero-install" | |
elif [[ "omeroweb-install" =~ .*"$file".* ]]; then | |
value="${value} omeroweb-install" | |
fi | |
echo "value=$value" >> $GITHUB_OUTPUT | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v4 | |
with: | |
labels: include | |
token: ${{secrets.ACTION_API_TOKEN}} | |
commit-message: ${{ steps.upstream_repo.outputs.value }} | |
delete-branch: true | |
title: ${{ steps.upstream_repo.outputs.value }} | |
body: | | |
- This PR contains changes from upstream repositories | |
Auto-generated by [create-pull-request][1] | |
[1]: https://github.com/peter-evans/create-pull-request |