1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/dex_ynh.git synced 2024-09-03 18:26:22 +02:00

Merge pull request #24 from Limezy/v2.35.0

V2.35.0
This commit is contained in:
Limezy 2022-10-04 19:27:11 +07:00 committed by GitHub
commit f14d65c6cc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 58 additions and 48 deletions

View file

@ -9,8 +9,6 @@
# Since each app is different, maintainers can adapt its contents so as to perform
# automatic actions when a new upstream release is detected.
# Remove this exit command when you are ready to run this Action
exit 1
#=================================================
# FETCHING LATEST RELEASE AND ITS ASSETS
@ -54,31 +52,8 @@ echo "${#assets[@]} available asset(s)"
# UPDATE SOURCE FILES
#=================================================
# Here we use the $assets variable to get the resources published in the upstream release.
# Here is an example for Grav, it has to be adapted in accordance with how the upstream releases look like.
# Let's loop over the array of assets URLs
for asset_url in ${assets[@]}; do
echo "Handling asset at $asset_url"
# Assign the asset to a source file in conf/ directory
# Here we base the source file name upon a unique keyword in the assets url (admin vs. update)
# Leave $src empty to ignore the asset
case $asset_url in
*"admin"*)
src="app"
;;
*"update"*)
src="app-upgrade"
;;
*)
src=""
;;
esac
# If $src is not empty, let's process the asset
if [ ! -z "$src" ]; then
src="app"
asset_url="https://github.com/dexidp/dex/archive/refs/tags/v${version}.tar.gz"
# Create the temporary directory
tempdir="$(mktemp -d)"
@ -91,30 +66,17 @@ checksum=$(sha256sum "$tempdir/$filename" | head -c 64)
# Delete temporary directory
rm -rf $tempdir
# Get extension
if [[ $filename == *.tar.gz ]]; then
extension=tar.gz
else
extension=${filename##*.}
fi
# Rewrite source file
cat <<EOT > conf/$src.src
SOURCE_URL=$asset_url
SOURCE_SUM=$checksum
SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=$extension
SOURCE_FORMAT=tar.gz
SOURCE_EXTRACT=true
SOURCE_IN_SUBDIR=true
SOURCE_FILENAME=
EOT
echo "... conf/$src.src updated"
else
echo "... asset ignored"
fi
done
#=================================================
# SPECIFIC UPDATE STEPS
#=================================================

49
.github/workflows/updater.yml vendored Normal file
View file

@ -0,0 +1,49 @@
# This workflow allows GitHub Actions to automagically update your app whenever a new upstream release is detected.
# You need to enable Actions in your repository settings, and fetch this Action from the YunoHost-Apps organization.
# This file should be enough by itself, but feel free to tune it to your needs.
# It calls updater.sh, which is where you should put the app-specific update steps.
name: Check for new upstream releases
on:
# Allow to manually trigger the workflow
workflow_dispatch:
# Run it every day at 6:00 UTC
schedule:
- cron: '0 6 * * *'
jobs:
updater:
runs-on: ubuntu-latest
steps:
- name: Fetch the source code
uses: actions/checkout@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Run the updater script
id: run_updater
run: |
# Setting up Git user
git config --global user.name 'yunohost-bot'
git config --global user.email 'yunohost-bot@users.noreply.github.com'
# Run the updater script
/bin/bash .github/workflows/updater.sh
- name: Commit changes
id: commit
if: ${{ env.PROCEED == 'true' }}
run: |
git commit -am "Upgrade to v$VERSION"
- name: Create Pull Request
id: cpr
if: ${{ env.PROCEED == 'true' }}
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: Update to version ${{ env.VERSION }}
committer: 'yunohost-bot <yunohost-bot@users.noreply.github.com>'
author: 'yunohost-bot <yunohost-bot@users.noreply.github.com>'
signoff: false
base: testing
branch: ci-auto-update-v${{ env.VERSION }}
delete-branch: true
title: 'Upgrade to version ${{ env.VERSION }}'
body: |
Upgrade to v${{ env.VERSION }}
draft: false

1
.gitignore vendored
View file

@ -1,2 +1,3 @@
*~
*.sw[op]
*.DS_Store

View file

@ -29,7 +29,6 @@ This Yunohost package will install Dex and setup a canonical OpenID Connect prov
## Screenshots
![Screenshot of Dex](./doc/screenshots/.DS_Store)
![Screenshot of Dex](./doc/screenshots/Dex_screenshot.png)
## Disclaimers / important information

View file

@ -29,7 +29,6 @@ This Yunohost package will install Dex and setup a canonical OpenID Connect prov
## Captures d'écran
![Capture d'écran de Dex](./doc/screenshots/.DS_Store)
![Capture d'écran de Dex](./doc/screenshots/Dex_screenshot.png)
## Avertissements / informations importantes

View file

@ -1,5 +1,5 @@
SOURCE_URL=https://github.com/dexidp/dex/archive/refs/tags/v2.34.0.tar.gz
SOURCE_SUM=39ea91dcd224604bf2a1e2e6918bc66a2f57ce76929e04745b48a4a8f6260e36
SOURCE_URL=https://github.com/dexidp/dex/archive/refs/tags/v2.35.0.tar.gz
SOURCE_SUM=7ca7667549186f2cda1dab6d5e487f83f57f255083255c715e510ae4a1e7e063
SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=tar.gz
SOURCE_EXTRACT=true

Binary file not shown.

View file

@ -5,7 +5,7 @@
"description": {
"en": "OpenID Connect Provider based on Yunohost LDAP server"
},
"version": "2.34.0~ynh1",
"version": "2.35.0~ynh1",
"url": "https://github.com/YunoHost-Apps/dex_ynh",
"upstream": {
"license": "Apache-2.0",

View file

@ -6,7 +6,7 @@
# dependencies used by the app
GO_VERSION="1.17"
GO_VERSION="1.19"
#=================================================
# PERSONAL HELPERS