Skip to content

Commit 15fc017

Browse files
committed
fix: authenticate push with rhacs-bot-token
1 parent b80e839 commit 15fc017

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎.github/workflows/update-readme.yml‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,21 @@ name: Update repository's main README file
22

33
on:
44
push:
5-
branches: [main]
5+
branches: [main, tm/update-rhacs-bot-push]
66

77
jobs:
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
@@ -31,7 +32,6 @@ jobs:
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!"

0 commit comments

Comments
 (0)