Skip to content

Commit

Permalink
ci: fix docker build
Browse files Browse the repository at this point in the history
  • Loading branch information
oknozor committed Apr 19, 2024
1 parent ca3ff26 commit 00346cd
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
19 changes: 9 additions & 10 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
9 changes: 7 additions & 2 deletions src/gh/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 00346cd

Please sign in to comment.