Skip to content

Commit

Permalink
feat(ci): allow running netsim from another branch (#1186)
Browse files Browse the repository at this point in the history
  • Loading branch information
Arqu committed Jul 10, 2023
1 parent d299092 commit 0f77e4e
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion .github/workflows/netsim.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,24 @@ jobs:
run: |
cargo build --profile optimized-release --workspace --all-features
- name: Detect chuck branch
if: github.event_name == 'issue_comment'
id: detect_chuck_branch
run: |
a='${{ github.event.comment.body }}'
branch="main"
if [[ $a == '/netsim branch'* ]];
then
a=$(echo "$a" | tr '\n' ' ' | tr -s " " | cut -d ' ' -f3)
branch="$a"
fi
echo "CHUCK_BRANCH=$branch" >> ${GITHUB_ENV}
- name: Fetch and build chuck
run: |
cd ..
rm -rf chuck
git clone https://github.com/n0-computer/chuck.git
git clone --single-branch --branch ${{ env.CHUCK_BRANCH }} https://github.com/n0-computer/chuck.git
cd chuck
cargo build --release
Expand Down

0 comments on commit 0f77e4e

Please sign in to comment.