diff --git a/.github/workflows/rusk_ci.yml b/.github/workflows/rusk_ci.yml index ac2ed31cc9..9418167842 100644 --- a/.github/workflows/rusk_ci.yml +++ b/.github/workflows/rusk_ci.yml @@ -76,3 +76,21 @@ jobs: - uses: actions/checkout@v4 - uses: dsherret/rust-toolchain-file@v1 - run: cargo fmt --all -- --check + copy_to_host: + needs: test_nightly + runs-on: core + if: needs.test_nightly.result == 'success' && github.base_ref == 'main' + continue-on-error: true + steps: + - name: "Check and Copy Rusk Artifact to Host" + run: | + # Ensure the target directory exists + mkdir -p /var/opt/rusk-artifacts + + # Check if the rusk artifact exists before copying + if [ -f ./target/release/rusk ]; then + echo "Rusk artifact found. Copying to host." + cp ./target/release/rusk /var/opt/rusk-artifacts + else + echo "Rusk artifact not found. Skipping copy." + fi \ No newline at end of file