diff --git a/.github/workflows/updater_ffmpeg-static.sh b/.github/workflows/updater_ffmpeg-static.sh index f8637fb..7f407af 100644 --- a/.github/workflows/updater_ffmpeg-static.sh +++ b/.github/workflows/updater_ffmpeg-static.sh @@ -6,10 +6,11 @@ # Fetching information version_current=$(cat manifest.toml | tomlq -j '.version') -version_app=$(cat manifest.toml | tomlq -j '.version|split("~ynh")[0]') -version_ynh=$(cat manifest.toml | tomlq -j '.version|split("~ynh")[1]') -version_next="$version_app~ynh$(($version_ynh+1))" -version=$(echo "$version_next" | tr '~' '-') +# version_app=$(cat manifest.toml | tomlq -j '.version|split("~ynh")[0]') +# version_ynh=$(cat manifest.toml | tomlq -j '.version|split("~ynh")[1]') +# version_next="$version_app~ynh$(($version_ynh+1))" +# version=$(echo "$version_next" | tr '~' '-') +version=$(echo "$version_current" | tr '~' '-') 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') @@ -28,7 +29,7 @@ then echo "::warning ::No new version available" exit 0 # 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 echo "::warning ::A branch already exists for this update" exit 0 @@ -36,7 +37,7 @@ fi # Setting up the environment variables echo "Current version: $version_current" -echo "Latest version: $version_next" +# echo "Latest version: $version_next" echo "VERSION=$version" >> $GITHUB_ENV echo "REPO=$repo" >> $GITHUB_ENV @@ -45,7 +46,7 @@ echo "REPO=$repo" >> $GITHUB_ENV #================================================= # 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 sed -i "s@^\"amd64.sha256\" = .*@\"amd64.sha256\" = \"$amd64_sha_last\"@" manifest.toml diff --git a/.github/workflows/updater_ffmpeg-static.yml b/.github/workflows/updater_ffmpeg-static.yml index d01cf61..17463d5 100644 --- a/.github/workflows/updater_ffmpeg-static.yml +++ b/.github/workflows/updater_ffmpeg-static.yml @@ -36,21 +36,21 @@ jobs: id: commit if: ${{ env.PROCEED == 'true' }} run: | - git commit -am "Upgrade to v$VERSION" + git commit -am "Update ffmpeg-static sha for $VERSION" - name: Create Pull Request to testing id: cpr-testing if: ${{ env.PROCEED == 'true' }} uses: peter-evans/create-pull-request@v6 with: token: ${{ secrets.GITHUB_TOKEN }} - commit-message: Update to version ${{ env.VERSION }} + commit-message: Update ffmpeg-static sha for ${{ env.VERSION }} committer: 'yunohost-bot ' author: 'yunohost-bot ' signoff: false base: testing - branch: ci-auto-update-v${{ env.VERSION }} + branch: ci-auto-update-ffmpeg-static-sha-${{ env.VERSION }} delete-branch: true - title: 'Upgrade to version ${{ env.VERSION }}' + title: 'Update ffmpeg-static sha for ${{ env.VERSION }}' body: | - Upgrade to v${{ env.VERSION }} + Update ffmpeg-static sha for ${{ env.VERSION }} draft: false