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

update dependencies #6329

Merged
merged 3 commits into from
Jul 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/update.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: "Update version"
on:
schedule:
- cron: '0 0 * * 0'

jobs:
build:
name: Update dependencies
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: update versions
run: |
bash update_dependencies.sh
- name: Set up configuration
run: |
git config --global user.email github-actions@github.com
git config --global user.name github-actions
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
with:
labels: include
token: ${{secrets.ACTION_API_TOKEN}}
commit-message: "update dependencies"
delete-branch: true
title: "update dependencies"
body: |
- This PR contains changes from upstream repositories

Auto-generated by [create-pull-request][1]

[1]: https://github.com/peter-evans/create-pull-request

27 changes: 27 additions & 0 deletions update_dependencies.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/usr/bin/env bash
# This script is used by a GitHub action raining daily.
# It checks if a new version of the "ome" dependencies
# is available and updates the value in etc/omero.properties

# Check the Java packages
dirs=("org/openmicroscopy/omero-blitz" "org/openmicroscopy/omero-common-test" "org/openmicroscopy/omero-gateway" "ome/OMEZarrReader")
for dir in "${dirs[@]}"
do
:
values=(${dir//// })
value=${values[${#values[@]}-1]}
# get the latest version of the package
repopath="https://artifacts.openmicroscopy.org/artifactory/ome.releases/${dir}"
version=`curl -s ${repopath}/maven-metadata.xml | grep latest | sed "s/.*<latest>\([^<]*\)<\/latest>.*/\1/"`
sed -i -e "s/versions.${value}=.*/versions.${value}=${version}/" etc/omero.properties
done

# Check the Python package.
packages=("omero-scripts")
for package in "${packages[@]}"
do
:
version=`curl -Ls https://pypi.org/pypi/$package/json | jq -r .info.version`
sed -i -e "s/versions.${package}=.*/versions.${package}=${version}/" etc/omero.properties
done
rm -rf etc/omero.properties-e