Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ci] Add /update command to update upstream_utils #6817

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 84 additions & 0 deletions .github/workflows/comment-command.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,87 @@ jobs:
# Commit
git commit -am "Regenerate pregenerated files"
git push

update:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This duplicates .github/workflows/upstream-utils.yml. Maybe you could dispatch to that workflow from here?

if: github.event.issue.pull_request && startsWith(github.event.comment.body, '/update')
runs-on: ubuntu-22.04
steps:
- name: React Rocket
uses: actions/github-script@v7
with:
script: |
const {owner, repo} = context.issue
github.rest.reactions.createForIssueComment({
owner,
repo,
comment_id: context.payload.comment.id,
content: "rocket",
});
- uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.COMMENT_COMMAND_PAT_TOKEN }}
- name: Fetch all history and metadata
run: |
git checkout -b pr
git branch -f main origin/main
- name: Set up Python 3.9
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Configure committer identity
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
- name: Run update_eigen.py
run: |
cd upstream_utils
./update_eigen.py
- name: Run update_fmt.py
run: |
cd upstream_utils
./update_fmt.py
- name: Run update_gcem.py
run: |
cd upstream_utils
./update_gcem.py
- name: Run update_json.py
run: |
cd upstream_utils
./update_json.py
- name: Run update_libuv.py
run: |
cd upstream_utils
./update_libuv.py
- name: Run update_llvm.py
run: |
cd upstream_utils
./update_llvm.py
- name: Run update_mpack.py
run: |
cd upstream_utils
./update_mpack.py
- name: Run update_stack_walker.py
run: |
cd upstream_utils
./update_stack_walker.py
- name: Run update_memory.py
run: |
cd upstream_utils
./update_memory.py
- name: Run update_protobuf.py
run: |
cd upstream_utils
./update_protobuf.py
- name: Run update_sleipnir.py
run: |
cd upstream_utils
./update_sleipnir.py
- name: Check output
run: git --no-pager diff --exit-code HEAD
- name: Commit
run: |
# Commit
git add .
git commit -m "Updated upstream utils files"
git push
Loading