File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11name : build
22
3- # Builds the project inside the Docker image (downloading all Maven dependencies and
4- # producing the module jars), then publishes the image to GitHub Container Registry.
3+ # Publishes images to GitHub Container Registry. By default only the slim image
4+ # (org.openprojectx.* Maven artifacts) is built. The full image (full Maven build with all
5+ # deps + jars) is opt-in: trigger the workflow manually with "build_full" enabled.
56on :
67 push :
78 branches : [ main, master ]
89 tags : [ 'v*' ]
910 pull_request :
1011 workflow_dispatch :
12+ inputs :
13+ build_full :
14+ description : ' Also build and push the full (heavy) image'
15+ type : boolean
16+ default : false
1117
1218env :
1319 REGISTRY : ghcr.io
4046 id : vars
4147 run : echo "short_sha=${GITHUB_SHA:0:8}" >> "$GITHUB_OUTPUT"
4248
49+ # Full image: opt-in only (manual run with build_full=true). Disabled by default.
4350 - name : Docker metadata
4451 id : meta
52+ if : ${{ inputs.build_full }}
4553 uses : docker/metadata-action@v5
4654 with :
4755 # metadata-action lowercases the image name, so mixed-case owners are fine.
5664 # The Dockerfile runs `mvn install` (install the deps and build in the image build),
5765 # keeping the downloaded deps, built jars and source inside the published image.
5866 - name : Build and push image
67+ if : ${{ inputs.build_full }}
5968 uses : docker/build-push-action@v6
6069 with :
6170 context : .
Original file line number Diff line number Diff line change @@ -146,12 +146,13 @@ docker build -f Dockerfile.slim -t spark-test-openprojectx .
146146
147147## CI / GitHub Container Registry
148148
149- [ ` .github/workflows/build.yml ` ] ( .github/workflows/build.yml ) builds that image (installing the deps
150- and building the jars in the image build) and publishes it to ** GitHub Container Registry**
151- (` ghcr.io/<owner>/spark-test ` ) on pushes to the default branch and on ` v* ` tags. It also builds and
152- pushes the [ slim image] ( #slim-image-dockerfileslim ) to the same repo with ` -slim ` -suffixed tags
153- (` latest-slim ` , ` <short-sha>-slim ` , …). It needs no extra secrets — it authenticates with the
154- built-in ` GITHUB_TOKEN ` (` packages: write ` ). Pull requests build both images but do not push.
149+ [ ` .github/workflows/build.yml ` ] ( .github/workflows/build.yml ) publishes to ** GitHub Container
150+ Registry** (` ghcr.io/<owner>/spark-test ` ). By ** default it builds and pushes only the
151+ [ slim image] ( #slim-image-dockerfileslim ) ** (` -slim ` -suffixed tags: ` latest-slim ` , ` <short-sha>-slim ` ,
152+ …). The full image (the heavy full Maven build) is ** opt-in and disabled by default** — trigger the
153+ workflow manually (` workflow_dispatch ` ) with the ** ` build_full ` ** input enabled to also build and
154+ push it. It needs no extra secrets — it authenticates with the built-in ` GITHUB_TOKEN `
155+ (` packages: write ` ). Pull requests build the image(s) but do not push.
155156
156157[ ` .github/workflows/windows.yml ` ] ( .github/workflows/windows.yml ) runs on ` windows-latest ` to check
157158Windows compatibility: it builds every module with Maven and verifies the ` hadoop-native-loader `
You can’t perform that action at this time.
0 commit comments