Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FMO-38: CI/CD fatal #51

Merged
merged 1 commit into from
Jun 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/actions/build-action/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ err_exit() {
echo "build target: $BUILD_TARGET"
cd $GITHUB_WORKSPACE

echo "::group::Add $GITHUB_WORKSPACE/.git as safe directory"
git config --global --add safe.directory $GITHUB_WORKSPACE/.git
echo "::endgroup::"

echo "::group::Input validation"
[ ! "$BUILD_TARGET" ] && err_exit 1 "BUILD_TARGET undefined"
[ ! "$CACHIX_TOKEN" ] && err_exit 1 "CACHIX_TOKEN undefined"
Expand Down Expand Up @@ -59,6 +63,16 @@ ssh-keyscan -t ed25519 -H github.com > $SSH_DIR/known_hosts
chmod 600 $SSH_DIR/known_hosts
echo "::endgroup::"

echo "::group::RUNNER_TEMP WAR"
if [ ! -e $RUNNER_TEMP ]; then
echo "::warning RUNNER_TEMP ( $RUNNER_TEMP ) dir does not exists. \
It will cause the cachix fail. \
WAR: create this dir. This WAR need to be removed ASAP. \
JIRA: FMO-39 for monitoring this issue."
mkdir -p $RUNNER_TEMP
fi
echo "::endgroup::"

echo "::group::Build $BUILD_TARGET"
nix flake show
cachix watch-exec fmo-os -- \
Expand Down
Loading