Skip to content

Commit

Permalink
Merge pull request #96 from blocktrron/pr-detect-missing-keys
Browse files Browse the repository at this point in the history
ci: print warning when signing should happen in fork
  • Loading branch information
blocktrron authored Aug 9, 2024
2 parents 5ba8447 + 08a00c2 commit 08b1aab
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/build-meta.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
set -euxo pipefail

SCRIPT_DIR="$(dirname "$0")"
UPSTREAM_REPO_NAME="freifunk-darmstadt/site-ffda"

OVERRIDES_DIR="$SCRIPT_DIR/overrides/build-meta"

Expand Down Expand Up @@ -179,6 +180,21 @@ if [ "$GITHUB_EVENT_NAME" = "pull_request" ]; then
SIGN_MANIFEST="0"
fi

# Signing should only happen when pushed to the upstream repository.
# Skip this step for the pipeline to succeed but inform the user.
if [ "$GITHUB_REPOSITORY" != "$UPSTREAM_REPO_NAME" ] && [ "$SIGN_MANIFEST" != "0" ]; then
SIGN_MANIFEST="0"

echo "::warning::Skip manifest signature due to action running in fork."
fi

# We should neither deploy in a fork, as the workflow is hard-coding out firmware-server
if [ "$GITHUB_REPOSITORY" != "$UPSTREAM_REPO_NAME" ] && [ "$DEPLOY" != "0" ]; then
DEPLOY="0"

echo "::warning::Skip deployment due to action running in fork."
fi

# Determine Version to use
RELEASE_VERSION="${RELEASE_VERSION:-$DEFAULT_RELEASE_VERSION}"

Expand Down

0 comments on commit 08b1aab

Please sign in to comment.