diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fa1cf20..56d9bae 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -23,11 +23,16 @@ jobs: uses: gmiam/rust-musl-action@master with: args: cargo build --target $BUILD_TARGET --release - - uses: actions/upload-artifact@v2 - name: Upload artifact - with: - name: ${{ env.BINARY_NAME }} - path: target/x86_64-unknown-linux-musl/release/${{ env.BINARY_NAME }}* - - uses: ncipollo/release-action@v1 - with: - artifacts: target/x86_64-unknown-linux-musl/release/${{ env.BINARY_NAME }}* \ No newline at end of file + release: + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - uses: actions/upload-artifact@v2 + name: Upload artifact + with: + name: ${{ env.BINARY_NAME }} + path: target/x86_64-unknown-linux-musl/release/${{ env.BINARY_NAME }}* + - uses: ncipollo/release-action@v1 + with: + artifacts: target/x86_64-unknown-linux-musl/release/${{ env.BINARY_NAME }}* \ No newline at end of file diff --git a/src/main.rs b/src/main.rs index e94a06c..d25f8d6 100644 --- a/src/main.rs +++ b/src/main.rs @@ -174,12 +174,11 @@ fn main() { .collect::>()[0] .to_string(); let ip = ip.parse::().unwrap(); - //let ip = hosts_and_ips.get(&ip).unwrap_or(&"Couldn't parse IP".yellow().bold().to_string()); info!( "{}", hosts_and_ips .get(&ip) - .unwrap_or(&"Couldn't parse IP".yellow().bold().to_string()) + .unwrap_or(&"Couldn't parse IP".to_string()).to_string().yellow().bold().to_string() ); let output = match result { Ok(output) => output, @@ -189,13 +188,13 @@ fn main() { } }; if output.exit_status == 0 { - info!("Code {}", output.exit_status.to_string().green()); + println!("Code {}", output.exit_status); } else { - info!("Code {}", output.exit_status.to_string().red()); + error!("Code {}", output.exit_status); }; if !args.code { - info!("STDOUT:\n{}", String::from_utf8(output.stdout).unwrap()); - info!("STDERR:\n{}", String::from_utf8(output.stderr).unwrap()); + println!("STDOUT:\n{}", String::from_utf8(output.stdout).unwrap()); + println!("STDERR:\n{}", String::from_utf8(output.stderr).unwrap()); } } } else {