-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
56 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,7 @@ permissions: | |
contents: read | ||
|
||
jobs: | ||
lint-test-build: | ||
main: | ||
name: Nx Cloud - Main Job | ||
uses: nrwl/ci/.github/workflows/[email protected] | ||
with: | ||
|
@@ -27,34 +27,6 @@ jobs: | |
npx nx affected --target=test --parallel=3 --ci --code-coverage | ||
npx nx affected --target=build --parallel=3 | ||
build-docker: | ||
needs: lint-test-build | ||
name: Build and upload docker image and archive | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Build datahub and produce archives | ||
if: github.event_name == 'release' | ||
run: | | ||
npx nx run-many --projects=datahub --target=build | ||
- uses: docker/login-action@v1 | ||
name: Login to GitHub Container Registry | ||
with: | ||
registry: ghcr.io | ||
username: c2c-bot-gis-ci | ||
password: ${{ secrets.GOPASS_CI_GITHUB_TOKEN }} | ||
|
||
- name: Setting image tag | ||
id: version | ||
run: echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3) | ||
|
||
- name: "Pushing the image onto ghcr.io" | ||
run: | | ||
docker image ls --format '{{.Repository}}:{{.Tag}}' --filter=reference='ghcr.io/camptocamp/mel-dataplatform/*' | \ | ||
xargs -r -L1 docker push $1 | ||
agents: | ||
name: Nx Cloud - Agents | ||
uses: nrwl/ci/.github/workflows/[email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: Docker | ||
|
||
env: | ||
NODE_VERSION: 18.16.1 | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
jobs: | ||
build-docker: | ||
needs: lint-test-build | ||
name: Build and upload docker image and archive | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Use Node.js ${{ env.NODE_VERSION }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
cache: 'npm' | ||
|
||
- name: Install dependencies | ||
run: npm i | ||
|
||
- name: Run tests | ||
run: npx nx e2e mel-datahub-e2e | ||
|
||
- name: Build datahub and produce archives | ||
if: github.event_name == 'release' | ||
run: | | ||
npx nx build datahub | ||
- uses: docker/login-action@v1 | ||
name: Login to GitHub Container Registry | ||
with: | ||
registry: ghcr.io | ||
username: c2c-bot-gis-ci | ||
password: ${{ secrets.GOPASS_CI_GITHUB_TOKEN }} | ||
|
||
- name: "Pushing the image onto ghcr.io" | ||
run: | | ||
docker image ls --format '{{.Repository}}:{{.Tag}}' --filter=reference='ghcr.io/camptocamp/mel-dataplatform/*' | \ | ||
xargs -r -L1 docker push $1 | ||
agents: | ||
name: Nx Cloud - Agents | ||
uses: nrwl/ci/.github/workflows/[email protected] | ||
with: | ||
number-of-agents: 3 |