Run build only on merge request

This commit is contained in:
GoncaloGarcia 2025-04-29 10:18:00 +01:00
parent 1ec5f9da56
commit 4ea11c4b09
3 changed files with 6 additions and 3 deletions

View File

@ -31,7 +31,7 @@ check_tag:
build_cloudflared_macos: &build
stage: build
rules:
- if: '$CI_COMMIT_BRANCH != "master"'
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
when: always
- when: never
dependencies:

View File

@ -167,9 +167,12 @@ rm -rf "${TARGET_DIRECTORY}"
export TARGET_OS="darwin"
GOCACHE="$PWD/../../../../" GOPATH="$PWD/../../../../" CGO_ENABLED=1 make cloudflared
# This allows apple tools to use the certificates in the keychain without requiring password input.
# This command always needs to run after the certificates have been loaded into the keychain
security set-key-partition-list -S apple-tool:,apple: -s -k "${CFD_CODE_SIGN_PASS}" cloudflared_build_keychain
if [[ ! -z "$CFD_CODE_SIGN_PASS" ]]; then
security set-key-partition-list -S apple-tool:,apple: -s -k "${CFD_CODE_SIGN_PASS}" cloudflared_build_keychain
fi
# sign the cloudflared binary
if [[ ! -z "$CODE_SIGN_NAME" ]]; then

View File

@ -239,7 +239,7 @@ github-release:
.PHONY: macos-release
macos-release:
- python3 github_release.py --path $(PWD)/artifacts/ --release-version $(VERSION) --draft --dry-run
- python3 github_release.py --path $(PWD)/artifacts/ --release-version $(VERSION)
.PHONY: r2-linux-release
r2-linux-release: