diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index d4d40b7..58d1608 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -76,7 +76,7 @@ jobs: command: build args: --target ${{ matrix.target }} --release - - uses: actions/upload-artifact@master + - uses: actions/upload-artifact@v3 with: name: ${{ matrix.target }} path: ./target/${{ matrix.target }}/release/cocogitto_github_app @@ -106,20 +106,19 @@ jobs: with: path: ~/artifacts - - run: ls ~/artifacts - - name: Copy artifacts to build dir run: | mkdir -p target/x86_64-unknown-linux-musl/release/ + cp -r /home/runner/artifacts/x86_64-unknown-linux-musl/cocogitto_github_app target/x86_64-unknown-linux-musl/release/cocogitto_github_app + chmod +x target/x86_64-unknown-linux-musl/release/cocogitto_github_app + mkdir -p target/aarch64-unknown-linux-musl/release/ + cp -r /home/runner/artifacts/aarch64-unknown-linux-musl/cocogitto_github_app target/aarch64-unknown-linux-musl/release/cocogitto_github_app + chmod +x target/aarch64-unknown-linux-musl/release/cocogitto_github_app + mkdir -p target/armv7-unknown-linux-musleabihf/release/ - cp -r ~/artifacts/aarch64-unknown-linux-musl/* target/aarch64-unknown-linux-musl/release/ - cp -r ~/artifacts/armv7-unknown-linux-musleabihf/* target/armv7-unknown-linux-musleabihf/release/ - cp -r ~/artifacts/x86_64-unknown-linux-musl/* target/x86_64-unknown-linux-musl/release/ - chmod +x -R target/aarch64-unknown-linux-musl/release - chmod +x -R target/armv7-unknown-linux-musleabihf/release - chmod +x -R target/x86_64-unknown-linux-musl/release - working-directory: ./ + cp -r /home/runner/artifacts/armv7-unknown-linux-musleabihf/cocogitto_github_app target/armv7-unknown-linux-musleabihf/release/cocogitto_github_app + chmod +x target/armv7-unknown-linux-musleabihf/release/cocogitto_github_app - if: ${{ github.ref_type == 'tag' }} name: Update multi-arch container latest diff --git a/src/gh/mod.rs b/src/gh/mod.rs index dec82af..8f0931a 100644 --- a/src/gh/mod.rs +++ b/src/gh/mod.rs @@ -5,7 +5,7 @@ use octocrab::models::issues::Comment; use octocrab::models::repos::RepoCommit; use octocrab::Octocrab; use tokio::join; -use tracing::{info, warn}; +use tracing::{error, info, warn}; use event::CheckSuiteEvent; @@ -41,7 +41,12 @@ impl CocogittoBot { } info!("Authenticating to github api"); - let inner = authenticate(installation.id, &repository.name, gh_key).await?; + let auth = authenticate(installation.id, &repository.name, gh_key).await; + if let Err(auth_error) = &auth { + error!("Failed to authenticate: {auth_error}"); + } + + let inner = auth?; let pull_request_number = check_suite .pull_requests .into_iter()