@@ -968,7 +968,7 @@ jobs:
968
968
needs :changes
969
969
# We always build the dylibs on Go changes to verify we're not merging unbuildable code,
970
970
# but they need only be signed and uploaded on coder/coder main.
971
- if :true
971
+ if :needs.changes.outputs.go == ' true' || needs.changes.outputs.ci == 'true' || github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/')
972
972
runs-on :${{ github.repository_owner == 'coder' && 'depot-macos-latest' || 'macos-latest' }}
973
973
steps :
974
974
# Harden Runner doesn't work on macOS
@@ -996,7 +996,7 @@ jobs:
996
996
uses :./.github/actions/setup-go
997
997
998
998
-name :Install rcodesign
999
- if :true
999
+ if :${{ github.repository_owner == 'coder' && github.ref == 'refs/heads/main' }}
1000
1000
run :|
1001
1001
set -euo pipefail
1002
1002
wget -O /tmp/rcodesign.tar.gz https://github.com/indygreg/apple-platform-rs/releases/download/apple-codesign%2F0.22.0/apple-codesign-0.22.0-macos-universal.tar.gz
@@ -1033,7 +1033,7 @@ jobs:
1033
1033
AC_CERTIFICATE_PASSWORD_FILE :/tmp/apple_cert_password.txt
1034
1034
1035
1035
-name :Upload build artifacts
1036
- if :true
1036
+ if :${{ github.repository_owner == 'coder' && github.ref == 'refs/heads/main' }}
1037
1037
uses :actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
1038
1038
with :
1039
1039
name :dylibs
@@ -1093,7 +1093,7 @@ jobs:
1093
1093
needs :
1094
1094
-changes
1095
1095
-build-dylib
1096
- if :true
1096
+ if :(github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/')) && needs.changes.outputs.docs-only == 'false' && !github.event.pull_request.head.repo.fork
1097
1097
runs-on :${{ github.repository_owner == 'coder' && 'depot-ubuntu-22.04-8' || 'ubuntu-22.04' }}
1098
1098
permissions :
1099
1099
# Necessary to push docker images to ghcr.io.
@@ -1260,7 +1260,7 @@ jobs:
1260
1260
make build/coder_"$version"_linux_{amd64,arm64,armv7}.tag
1261
1261
1262
1262
# only push if we are on main branch or release branch
1263
- iffalse ; then
1263
+ if[[ "${GITHUB_REF}" == "refs/heads/main" || "${GITHUB_REF}" == refs/heads/release/* ]] ; then
1264
1264
# build and push multi-arch manifest, this depends on the other images
1265
1265
# being pushed so will automatically push them
1266
1266
# note: omitting the -j argument to avoid race conditions when pushing
@@ -1479,11 +1479,14 @@ jobs:
1479
1479
deploy :
1480
1480
needs :
1481
1481
-changes
1482
- # - build
1483
- if :true
1482
+ -build
1483
+ if :|
1484
+ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/'))
1485
+ && needs.changes.outputs.docs-only == 'false'
1486
+ && !github.event.pull_request.head.repo.fork
1484
1487
uses :./.github/workflows/deploy.yaml
1485
1488
with :
1486
- image :ghcr.io/coder/coder-preview:2.26.0-devel-d5e433119
1489
+ image :${{ needs.build.outputs.IMAGE }}
1487
1490
permissions :
1488
1491
contents :read
1489
1492
id-token :write