Skip to content

Commit 69f39b2

Browse files
authored
fix(sage-monorepo): update task build-image configurations (#2919)
1 parent 3e84147 commit 69f39b2

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

.github/workflows/ci.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,8 @@ jobs:
6565
- name: Build and publish the images of the affected projects
6666
run: |
6767
devcontainer exec --workspace-folder ../sage-monorepo bash -c ". ./dev-env.sh \
68-
&& export VERSION=edge \
6968
&& echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin \
70-
&& nx affected --target=build-image --configuration=ci"
69+
&& nx affected --target=build-image --configuration=edge"
7170
7271
- name: Remove the dev container
7372
run: docker rm -f sage_devcontainer

.github/workflows/release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,4 @@ jobs:
4444
devcontainer exec --workspace-folder ../sage-monorepo bash -c ". ./dev-env.sh \
4545
&& export VERSION=${{ env.VERSION }} \
4646
&& echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin \
47-
&& nx run-many --target=build-image --projects=${{ env.PRODUCT }}-* --configuration=ci"
47+
&& nx run-many --target=build-image --projects=${{ env.PRODUCT }}-* --configuration=release"

libs/sage-monorepo/nx-plugin/src/plugins/build-image-target.ts

+9-3
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ export async function buildImageTarget(
3434
return {
3535
executor: '@nx-tools/nx-container:build',
3636
outputs: [],
37-
3837
options: {
3938
context,
4039
},
@@ -43,10 +42,17 @@ export async function buildImageTarget(
4342
local: {
4443
metadata: {
4544
images: [`ghcr.io/sage-bionetworks/${projectName}`],
46-
tags: ['type=edge,branch=main', 'type=raw,value=local', 'type=sha'],
45+
tags: ['type=raw,value=local', 'type=sha'],
46+
},
47+
},
48+
edge: {
49+
metadata: {
50+
images: [`ghcr.io/sage-bionetworks/${projectName}`],
51+
tags: ['type=edge,branch=main', 'type=sha'],
4752
},
53+
push: true,
4854
},
49-
ci: {
55+
release: {
5056
metadata: {
5157
images: [`ghcr.io/sage-bionetworks/${projectName}`],
5258
tags: ['type=semver,pattern={{version}},value=${VERSION}', 'type=sha'],

0 commit comments

Comments
 (0)