Skip to content

Commit

Permalink
fix(sage-monorepo): update task build-image configurations (#2919)
Browse files Browse the repository at this point in the history
  • Loading branch information
tschaffter authored Nov 22, 2024
1 parent 3e84147 commit 69f39b2
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,8 @@ jobs:
- name: Build and publish the images of the affected projects
run: |
devcontainer exec --workspace-folder ../sage-monorepo bash -c ". ./dev-env.sh \
&& export VERSION=edge \
&& echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin \
&& nx affected --target=build-image --configuration=ci"
&& nx affected --target=build-image --configuration=edge"
- name: Remove the dev container
run: docker rm -f sage_devcontainer
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ jobs:
devcontainer exec --workspace-folder ../sage-monorepo bash -c ". ./dev-env.sh \
&& export VERSION=${{ env.VERSION }} \
&& echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin \
&& nx run-many --target=build-image --projects=${{ env.PRODUCT }}-* --configuration=ci"
&& nx run-many --target=build-image --projects=${{ env.PRODUCT }}-* --configuration=release"
12 changes: 9 additions & 3 deletions libs/sage-monorepo/nx-plugin/src/plugins/build-image-target.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ export async function buildImageTarget(
return {
executor: '@nx-tools/nx-container:build',
outputs: [],

options: {
context,
},
Expand All @@ -43,10 +42,17 @@ export async function buildImageTarget(
local: {
metadata: {
images: [`ghcr.io/sage-bionetworks/${projectName}`],
tags: ['type=edge,branch=main', 'type=raw,value=local', 'type=sha'],
tags: ['type=raw,value=local', 'type=sha'],
},
},
edge: {
metadata: {
images: [`ghcr.io/sage-bionetworks/${projectName}`],
tags: ['type=edge,branch=main', 'type=sha'],
},
push: true,
},
ci: {
release: {
metadata: {
images: [`ghcr.io/sage-bionetworks/${projectName}`],
tags: ['type=semver,pattern={{version}},value=${VERSION}', 'type=sha'],
Expand Down

0 comments on commit 69f39b2

Please sign in to comment.