Skip to content

Commit

Permalink
Build affected images in CI workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
tschaffter committed Oct 24, 2023
1 parent 53e48d8 commit f061bfe
Showing 1 changed file with 2 additions and 28 deletions.
30 changes: 2 additions & 28 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ jobs:
# env:
# NX_BRANCH: main
steps:
- name: Show storage space usage
run: df -h

- uses: actions/checkout@v3
name: Checkout [${{ github.ref_name }}]
with:
Expand Down Expand Up @@ -132,21 +129,11 @@ jobs:
devcontainer exec --workspace-folder ../sage-monorepo bash -c ". ./dev-env.sh \
&& nx affected --target=sonar"
- name: Show storage space usage
run: df -h

# - name: Publish the images of the affected projects
# run: |
# devcontainer exec --workspace-folder ../sage-monorepo bash -c ". ./dev-env.sh \
# && nx affected --target=publish-and-remove-image --parallel=1"

- name: Publishing the images of the SELECTED projects
run: |
devcontainer exec --workspace-folder ../sage-monorepo bash -c ". ./dev-env.sh \
&& echo $DOCKER_PASSWORD | docker login --username $DOCKER_USERNAME --password-stdin ghcr.io \
&& nx run-many --target=publish-and-remove-image \
--projects=openchallenges-app,openchallenges-challenge-service,openchallenges-organization-service,openchallenges-image-service,openchallenges-api-gateway,schematic-api \
--parallel=1"
&& nx affected --target=publish-image"
- name: Remove the dev container
run: docker rm -f sage_devcontainer
Expand All @@ -165,9 +152,6 @@ jobs:
|| !startsWith(github.head_ref, 'renovate/')
)
steps:
- name: Show storage space usage
run: df -h

- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.ref }}
Expand Down Expand Up @@ -270,20 +254,10 @@ jobs:
devcontainer exec --workspace-folder ../sage-monorepo bash -c ". ./dev-env.sh \
&& nx run-many --target=integration-test"
# - name: Build the images of the affected projects
# run: |
# devcontainer exec --workspace-folder ../sage-monorepo bash -c ". ./dev-env.sh \
# && nx affected --target=build-and-remove-image --parallel=1"

- name: Show storage space usage
run: df -h

- name: Building the images of the SELECTED projects
run: |
devcontainer exec --workspace-folder ../sage-monorepo bash -c ". ./dev-env.sh \
&& nx run-many --target=build-and-remove-image \
--projects=openchallenges-app,openchallenges-challenge-service,openchallenges-organization-service,openchallenges-image-service,openchallenges-api-gateway,schematic-api \
--parallel=1"
&& nx affected --target=build-image"
- name: Remove the dev container
run: docker rm -f sage_devcontainer

0 comments on commit f061bfe

Please sign in to comment.