Skip to content

Adjust patch step and paths before Docker run #550

Adjust patch step and paths before Docker run

Adjust patch step and paths before Docker run #550

name: Update XLA Hash

Check failure on line 1 in .github/workflows/update-xla-hash.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/update-xla-hash.yml

Invalid workflow file

(Line: 18, Col: 5): Required property is missing: runs-on
on:
workflow_dispatch:
inputs:
xla_hash:
description: Full commit hash or branch name of the XLA commit
type: string
required: true
xla_repo:
description: XLA repo that the commit is from. Should be of the form <owner>/<repo>.
type: string
requird: false
default: openxla/xla
jobs:
update-xla-hash:
env:
# yamllint disable-line rule:line-length
NEW_BRANCH_NAME: ci-xlahash-${{ github.ref_name }}_${{ github.run_id }}}_${{ github.run_number }}_${{ github.run_attempt }}
steps:
- name: Change owners for cleanup
run: |
docker run --rm -v "./:/rocm-jax" ubuntu /bin/bash -c "chown -R $UID /rocm-jax/* || true"
- uses: actions/checkout@v4
- name: Generate an app token
id: generate-token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ vars.ROCM_REPO_MANAGEMENT_API_2_ID }}
private-key: ${{ secrets.ROCM_REPO_MANAGEMENT_API_2_PRIV_KEY }}
- name: Run update script
run: |
python3 tools/update_xla_hash.py -v \
--xla-repo ${{ inputs.xla_repo }} \
--gh-token $GH_TOKEN ${{ inputs.xla_hash }}
env:
GH_TOKEN: ${{ steps.generate-token.outputs.token }}
- name: Create branch for PR
run: |
git checkout -b $NEW_BRANCH_NAME
git config --global user.email "[email protected]"
git config --global user.name "GitHub Actions"
git push origin HEAD
- name: Open PR
run: |
gh pr create \
--repo ${{ github.repository }} \
--head $NEW_BRANCH_NAME \
--base ${{ github.ref_name }} \
--title "CI: $(date +%x) XLA hash update" \
--body "Update the XLA commit hash"
env:
GH_TOKEN: ${{ steps.generate-token.outputs.token }}