gen: use peter-evans/create-pull-request@v7

We already use this for the lint job on main.
reviewable/pr1170/r1
Tamir Duberstein 3 weeks ago
parent c8f14b18d4
commit 76d1b9f46e

@ -59,7 +59,11 @@ jobs:
- uses: peter-evans/create-pull-request@v7 - uses: peter-evans/create-pull-request@v7
if: github.event_name != 'pull_request' && github.repository_owner == 'aya-rs' if: github.event_name != 'pull_request' && github.repository_owner == 'aya-rs'
with: with:
commit-message: "public-api: regenerate" branch: create-pull-request/public-api
commit-message: 'public-api: regenerate'
title: 'public-api: regenerate'
body: |
**Automated changes**
- name: Run miri - name: Run miri
run: | run: |

@ -14,61 +14,35 @@ jobs:
- name: update libbpf - name: update libbpf
working-directory: xtask/libbpf working-directory: xtask/libbpf
run: | run: |
set -e set -euxo pipefail
git fetch origin git fetch origin
git checkout origin/HEAD git checkout origin/HEAD
echo "LIBBPF_SHA=$(git rev-parse HEAD)" >> $GITHUB_ENV echo "LIBBPF_SHA=$(git rev-parse HEAD)" >> $GITHUB_ENV
- uses: dtolnay/rust-toolchain@master - uses: dtolnay/rust-toolchain@nightly
with: with:
toolchain: nightly
components: rustfmt, clippy components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2 - uses: Swatinem/rust-cache@v2
- name: Install headers - name: Install headers
run: | run: |
set -euxo pipefail
sudo apt -y update sudo apt -y update
sudo apt -y install libelf-dev libc6-dev libc6-dev-{arm64,armel,riscv64,ppc64el,s390x,mips}-cross sudo apt -y install libelf-dev libc6-dev libc6-dev-{arm64,armel,riscv64,ppc64el,s390x,mips}-cross
- name: Run codegen - run: cargo xtask codegen
run: | - run: cargo xtask public-api --bless
cargo xtask codegen
- name: Check for changes
run: |
git diff --quiet || echo "COMMIT_CHANGES=1" >> $GITHUB_ENV
- name: Bless public API changes
if: env.COMMIT_CHANGES == 1
run: |
cargo xtask public-api --bless
- name: Commit Changes - uses: peter-evans/create-pull-request@v7
id: commit
if: env.COMMIT_CHANGES == 1
uses: devops-infra/action-commit-push@master
with: with:
github_token: "${{ secrets.CRABBY_GITHUB_TOKEN }}" branch: create-pull-request/codegen
commit_message: | commit-message: |
chore(aya-obj, aya-ebpf-bindings): Regenerate bindings aya-obj, aya-ebpf-bindings: regenerate
libbpf commit: ${{ env.LIBBPF_SHA }} libbpf commit: ${{ env.LIBBPF_SHA }}
title: 'aya-obj, aya-ebpf-bindings: regenerate'
target_branch: codegen
force: true
- name: Create pull request
if: steps.commit.outputs.files_changed != ''
uses: devops-infra/action-pull-request@master
with:
github_token: ${{ secrets.CRABBY_GITHUB_TOKEN }}
body: | body: |
**Automated pull request** **Automated changes**
libbpf commit: ${{ env.LIBBPF_SHA }} libbpf commit: ${{ env.LIBBPF_SHA }}
title: "chore(aya-obj, aya-ebpf-bindings): Regenerate bindings"
source_branch: codegen
target_branch: main
get_diff: true

Loading…
Cancel
Save