File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,20 +2,21 @@ name: Update repository's main README file
22
33on :
44 push :
5- branches : [main]
5+ branches : [main, tm/update-rhacs-bot-push ]
66
77jobs :
88 README_UPDATE :
99 runs-on : ubuntu-latest
1010 steps :
11- - uses : actions/checkout@v4
11+ - uses : actions/checkout@v6
1212 with :
1313 ref : ${{ github.head_ref }}
1414 # Fetching all branches here to get main and master.
1515 fetch-depth : 0
16+ token : ${{ secrets.RHACS_BOT_GITHUB_TOKEN }}
1617 - name : Updating README
18+ shell : bash
1719 run : |
18- SHELL=/bin/bash
1920 LATEST_VERSION="$(ls | grep -E '^[0-9]+(\.[0-9]+)*$' | sort --version-sort | tail -n 1)"
2021 echo "LATEST VERSION is $LATEST_VERSION"
2122 sed -i.bak -E 's@(Latest version: |Latest%20version-|\[Latest version\]: \./)[0-9]+(\.[0-9]+)*@\1'"$LATEST_VERSION"'@g' README.md
3132 echo "Updated README and latest symlink"
3233 git config --global user.name '${{ vars.RHACS_BOT_GITHUB_USERNAME }}'
3334 git config --global user.email '${{ vars.RHACS_BOT_GITHUB_EMAIL }}'
34- git remote set-url origin https://x-access-token:${{ secrets.RHACS_BOT_GITHUB_TOKEN }}@github.com/"$GITHUB_REPOSITORY"
3535 msg="Updated latest version reference to ${LATEST_VERSION}"
3636 if grep -q "$msg" < <(git log -n 1 --pretty='format:%s'); then
3737 echo "Latest version update already exists, but still changes detected!"
You can’t perform that action at this time.
0 commit comments