mirror of
https://github.com/open-telemetry/opentelemetry-python-contrib.git
synced 2025-07-29 13:12:39 +08:00
Remove update-sha workflow (#1594)
This commit is contained in:
50
.github/workflows/update-sha.yml
vendored
50
.github/workflows/update-sha.yml
vendored
@ -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
|
|
Reference in New Issue
Block a user