Remove update-sha workflow (#1594)

This commit is contained in:
Srikanth Chekuri
2023-01-24 01:24:01 +05:30
committed by GitHub
parent cca90db86f
commit e1a1bada1f

View File

@ -1,50 +0,0 @@
name: Update SHA
on: issue_comment
jobs:
update-pr-sha:
name: Update SHA
if: ${{ github.event.issue.pull_request && contains(github.event.comment.body, 'update-sha') }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.BOT_TOKEN }}
# would have been lit if github supported string split expression
- name: Extract branch name from comment to get commit SHA
uses: jungwinter/split@v2
id: split
with:
msg: ${{ github.event.comment.body }}
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Use CLA approved github bot
run: .github/scripts/use-cla-approved-github-bot.sh
- name: Checkout Pull Request
env:
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}
run: |
PR_URL="${{ github.event.issue.pull_request.url }}"
PR_NUM=${PR_URL##*/}
echo "Checking out from PR #$PR_NUM based on URL: $PR_URL"
hub pr checkout $PR_NUM
# caching is not supported for this event type
- name: Run script
run: |
python -m pip install requests==2.28.1 ruamel.yaml==0.17.21
python scripts/update_sha.py --branch ${{ steps.split.outputs._1 }}
- name: Commit and Push changes
env:
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}
run: |
git commit -a -m "Update SHA"
git push