1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/immich_ynh.git synced 2024-09-03 20:36:24 +02:00

Merge pull request #95 from YunoHost-Apps/master-promotion
Some checks are pending
YunoHost apps package linter / test (push) Waiting to run
Create master promotion pull request / masterPromotion (push) Waiting to run

Upgrade master from testing
This commit is contained in:
ewilly 2024-08-27 23:12:28 +02:00 committed by GitHub
commit e135424b52
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 13 additions and 12 deletions

View file

@ -6,10 +6,11 @@
# Fetching information # Fetching information
version_current=$(cat manifest.toml | tomlq -j '.version') version_current=$(cat manifest.toml | tomlq -j '.version')
version_app=$(cat manifest.toml | tomlq -j '.version|split("~ynh")[0]') # version_app=$(cat manifest.toml | tomlq -j '.version|split("~ynh")[0]')
version_ynh=$(cat manifest.toml | tomlq -j '.version|split("~ynh")[1]') # version_ynh=$(cat manifest.toml | tomlq -j '.version|split("~ynh")[1]')
version_next="$version_app~ynh$(($version_ynh+1))" # version_next="$version_app~ynh$(($version_ynh+1))"
version=$(echo "$version_next" | tr '~' '-') # version=$(echo "$version_next" | tr '~' '-')
version=$(echo "$version_current" | tr '~' '-')
repo=$(cat manifest.toml | tomlq -j '.upstream.code|split("https://github.com/")[1]') repo=$(cat manifest.toml | tomlq -j '.upstream.code|split("https://github.com/")[1]')
amd64_url=$(cat manifest.toml | tomlq -j '.resources.sources."ffmpeg-static".amd64.url') amd64_url=$(cat manifest.toml | tomlq -j '.resources.sources."ffmpeg-static".amd64.url')
@ -28,7 +29,7 @@ then
echo "::warning ::No new version available" echo "::warning ::No new version available"
exit 0 exit 0
# Proceed only if a PR for this new version does not already exist # Proceed only if a PR for this new version does not already exist
elif git ls-remote -q --exit-code --heads https://github.com/$GITHUB_REPOSITORY.git ci-auto-update-v$version elif git ls-remote -q --exit-code --heads https://github.com/$GITHUB_REPOSITORY.git ci-auto-update-ffmpeg-static-sha-$version
then then
echo "::warning ::A branch already exists for this update" echo "::warning ::A branch already exists for this update"
exit 0 exit 0
@ -36,7 +37,7 @@ fi
# Setting up the environment variables # Setting up the environment variables
echo "Current version: $version_current" echo "Current version: $version_current"
echo "Latest version: $version_next" # echo "Latest version: $version_next"
echo "VERSION=$version" >> $GITHUB_ENV echo "VERSION=$version" >> $GITHUB_ENV
echo "REPO=$repo" >> $GITHUB_ENV echo "REPO=$repo" >> $GITHUB_ENV
@ -45,7 +46,7 @@ echo "REPO=$repo" >> $GITHUB_ENV
#================================================= #=================================================
# Replace new version in manifest # Replace new version in manifest
sed -i "s/^version = .*/version = \"$version_next\"/" manifest.toml # sed -i "s/^version = .*/version = \"$version_next\"/" manifest.toml
# Replace sha356sum in manifest # Replace sha356sum in manifest
sed -i "s@^\"amd64.sha256\" = .*@\"amd64.sha256\" = \"$amd64_sha_last\"@" manifest.toml sed -i "s@^\"amd64.sha256\" = .*@\"amd64.sha256\" = \"$amd64_sha_last\"@" manifest.toml

View file

@ -36,21 +36,21 @@ jobs:
id: commit id: commit
if: ${{ env.PROCEED == 'true' }} if: ${{ env.PROCEED == 'true' }}
run: | run: |
git commit -am "Upgrade to v$VERSION" git commit -am "Update ffmpeg-static sha for $VERSION"
- name: Create Pull Request to testing - name: Create Pull Request to testing
id: cpr-testing id: cpr-testing
if: ${{ env.PROCEED == 'true' }} if: ${{ env.PROCEED == 'true' }}
uses: peter-evans/create-pull-request@v6 uses: peter-evans/create-pull-request@v6
with: with:
token: ${{ secrets.GITHUB_TOKEN }} token: ${{ secrets.GITHUB_TOKEN }}
commit-message: Update to version ${{ env.VERSION }} commit-message: Update ffmpeg-static sha for ${{ env.VERSION }}
committer: 'yunohost-bot <yunohost-bot@users.noreply.github.com>' committer: 'yunohost-bot <yunohost-bot@users.noreply.github.com>'
author: 'yunohost-bot <yunohost-bot@users.noreply.github.com>' author: 'yunohost-bot <yunohost-bot@users.noreply.github.com>'
signoff: false signoff: false
base: testing base: testing
branch: ci-auto-update-v${{ env.VERSION }} branch: ci-auto-update-ffmpeg-static-sha-${{ env.VERSION }}
delete-branch: true delete-branch: true
title: 'Upgrade to version ${{ env.VERSION }}' title: 'Update ffmpeg-static sha for ${{ env.VERSION }}'
body: | body: |
Upgrade to v${{ env.VERSION }} Update ffmpeg-static sha for ${{ env.VERSION }}
draft: false draft: false