Skip to content

Commit

Permalink
Fix CI job to update nightly version (#1204)
Browse files Browse the repository at this point in the history
make job push PR to wasmi repo
  • Loading branch information
Robbepop authored Sep 28, 2024
1 parent 2c95e64 commit d69b56e
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions .github/workflows/update-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,31 @@ jobs:
LATEST_NIGHTLY=$(echo $RUSTC_VERSION | grep -Po '\d{4}-\d{2}-\d{2}')
echo "LATEST_NIGHTLY=$LATEST_NIGHTLY" >> $GITHUB_ENV
- name: Create new branch
run: |
git checkout -b update-rust-nightly-$LATEST_NIGHTLY
- name: Update nightly version in CI workflow
run: |
FILE=".github/workflows/rust.yml"
sed -i "s/toolchain: nightly-[0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}/toolchain: nightly-$LATEST_NIGHTLY/" $FILE
- name: Commit and push changes
- name: Commit changes
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add .github/workflows/rust.yml
git commit -m "Update Rust nightly version to $LATEST_NIGHTLY"
git push
- name: Push changes to new branch
run: |
git push origin update-rust-nightly-$LATEST_NIGHTLY
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: update-rust-nightly-$LATEST_NIGHTLY
title: "CI: Update Rust nightly version to $LATEST_NIGHTLY"
body: "This PR updates the Rust nightly version to $LATEST_NIGHTLY."
base: main

0 comments on commit d69b56e

Please sign in to comment.