diff --git a/.github/workflows/release-version-update.yml b/.github/workflows/release-version-update.yml index c62158d1f..8105bc885 100644 --- a/.github/workflows/release-version-update.yml +++ b/.github/workflows/release-version-update.yml @@ -14,9 +14,15 @@ jobs: - name: Get release information id: get_release - uses: dawidd6/action-get-latest-release@v3 - with: - release: true + run: | + response=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" https://api.github.com/repos/${{ github.repository }}/releases/latest) + echo "$response" | jq '.tag_name, .name, .published_at, .body, .html_url' | tee /tmp/release_info + echo "::set-output name=tag_name::$(echo "$response" | jq -r .tag_name)" + echo "::set-output name=name::$(echo "$response" | jq -r .name)" + echo "::set-output name=published_at::$(echo "$response" | jq -r .published_at)" + echo "::set-output name=body::$(echo "$response" | jq -r .body)" + echo "::set-output name=html_url::$(echo "$response" | jq -r .html_url)" + - name: Update version.json run: | @@ -25,7 +31,7 @@ jobs: "release_name": "${{ steps.get_release.outputs.name }}", "published_at": "${{ steps.get_release.outputs.published_at }}", "body": "${{ steps.get_release.outputs.body }}" - "release_url": "${{ steps.get_release.outputs.html_url }}" + "html_url": "${{ steps.get_release.outputs.html_url }}" }' > version.json - name: Create new branch @@ -41,10 +47,12 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Create Pull Request - uses: peter-evans/create-pull-request@v5 - with: - token: ${{ secrets.GITHUB_TOKEN }} - branch: update-version-${{ steps.get_release.outputs.tag_name }} - title: "Update version.json for release ${{ steps.get_release.outputs.tag_name }}" - body: "This PR updates version.json with the latest release information." - base: develop # Target branch for the pull request + run: | + curl -X POST -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -H "Accept: application/vnd.github.v3+json" \ + https://api.github.com/repos/${{ github.repository }}/pulls \ + -d '{ + "title": "Update version.json for release ${{ steps.get_release.outputs.tag_name }}", + "body": "This PR updates version.json with the latest release information.", + "head": "update-version-${{ steps.get_release.outputs.tag_name }}", + "base": "develop" + }' diff --git a/src/templates/base.html b/src/templates/base.html index 8b0271172..337eba159 100644 --- a/src/templates/base.html +++ b/src/templates/base.html @@ -229,7 +229,7 @@