@@ -60,13 +60,14 @@ jobs:
6060 - container : redis
6161 - container : registryctl
6262 build_binary : harbor_registryctl
63+ run_build_script : registry
6364 - container : registry
64- has_custom_build_script : true
65+ run_build_script : true
6566 - container : standalone-db-migrator
6667 build_binary : migrate
6768 src_name : migration
6869 - container : trivy-adapter
69- has_custom_build_script : true
70+ run_build_script : true
7071
7172 steps :
7273 - uses : actions/checkout@v4
@@ -89,17 +90,16 @@ jobs:
8990
9091 - name : Set up additional flags
9192 if : ${{ matrix.container == 'core' }}
92- run : |
93- echo "ADDITIONAL_GO_FLAGS=-ldflags=\"-X github.com/goharbor/harbor/src/lib/config.GitCommit=$(git rev-parse HEAD) -X github.com/goharbor/harbor/src/lib/config.ReleaseVersion=$(git describe --tags --abbrev=0)\"" >> $GITHUB_ENV
94- echo "ADDITIONAL_GO_FLAGS=-ldflags=\"-X github.com/goharbor/harbor/src/lib/config.GitCommit=$(git rev-parse HEAD) -X github.com/goharbor/harbor/src/lib/config.ReleaseVersion=$(git describe --tags --abbrev=0)\""
93+ # TODO: Proper versioning
94+ run : echo "ADDITIONAL_GO_FLAGS=-ldflags=\"-X github.com/goharbor/harbor/src/lib/config.GitCommit=$(git rev-parse HEAD) -X github.com/goharbor/harbor/src/lib/config.ReleaseVersion=dev\"" >> $GITHUB_ENV
9595 - name : Build binary
9696 if : ${{ matrix.build_binary != '' }}
9797 run : |
9898 docker run --rm -v .:/harbor -w /harbor/src/${{ matrix.src_name || matrix.container}} golang:1.24.6 /usr/local/go/bin/go build -buildvcs=false -o /harbor/make/photon/${{ matrix.container }}/${{matrix.build_binary}} ${ADDITIONAL_GO_FLAGS:-}
9999 - name : Run custom build script
100- if : ${{ matrix.has_custom_build_script == true }}
100+ if : ${{ matrix.run_build_script }}
101101 run : |
102- ./make/photon/${{matrix.container}}/builder .sh
102+ ./make/photon/${{ matrix.run_build_script == true && matrix. container || matrix.run_build_script }}/build .sh
103103
104104 - name : Build and push
105105 uses : docker/build-push-action@v6
0 commit comments