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

Add auto-update workflow #25

Merged
merged 1 commit into from
Apr 10, 2023
Merged
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
39 changes: 39 additions & 0 deletions .github/workflows/quetz-version-autoupdate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Quetz version autoupdate
on:
workflow_dispatch:
schedule:
- cron: "0 6 * * *"

defaults:
run:
shell: bash -el {0}

jobs:
check_update:
name: Check if newer version exists
runs-on: ubuntu-latest
steps:
- name: Checkout branch
uses: actions/[email protected]
# We need to checkout with SSH here to have actions run on the PR.
with:
ssh-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Update Quetz version
run: |
set -eux
QUETZ_VERSION=$(curl https://api.github.com/repos/mamba-org/quetz/releases/latest -s | jq .tag_name -r)
if grep -Fxq "$QUETZ_VERSION" .quetz-server-versions
then
echo "No new version found."
else
echo "New version '$QUETZ_VERSION' found."
echo "\n$QUETZ_VERSION" >> .quetz-server-versions
fi
- uses: peter-evans/create-pull-request@38e0b6e68b4c852a5500a94740f0e535e0d7ba54
with:
commit-message: "Auto-update Quetz version."
title: "Auto-update Quetz version"
body: |
A new version of Quetz was detected.
branch: quetz-server-autoupdate
delete-branch: true