Skip to content

Commit

Permalink
Fix/ci (#38)
Browse files Browse the repository at this point in the history
* fix: ci

Signed-off-by: Mirko Mollik <[email protected]>

* fix: ci

Signed-off-by: Mirko Mollik <[email protected]>

* fix: add correct docker login

Signed-off-by: Mirko Mollik <[email protected]>

* fix: add github token

Signed-off-by: Mirko Mollik <[email protected]>

---------

Signed-off-by: Mirko Mollik <[email protected]>
  • Loading branch information
cre8 committed May 23, 2024
1 parent c823acc commit 7836805
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,15 @@ jobs:
node-version: 20
cache: 'pnpm'
- run: pnpm install --frozen-lockfile

- uses: nrwl/nx-set-shas@v4

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push images
run: INPUT_GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} INPUT_PUSH=true pnpm exec nx affected -t container
5 changes: 2 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ jobs:
cache: 'pnpm'
- run: pnpm install --frozen-lockfile
- uses: nrwl/nx-set-shas@v4
- run: git branch --track main origin/main
- name: Lint, test, build, and container
env:
INPUT_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: pnpm exec nx affected -t lint test build container
run: INPUT_GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} pnpm exec nx affected -t lint test container
5 changes: 4 additions & 1 deletion nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
"!{projectRoot}/src/test-setup.[jt]s",
"!{projectRoot}/test-setup.[jt]s"
],
"sharedGlobals": []
"sharedGlobals": [
"{workspaceRoot}/.github/workflows/ci.yml",
"{workspaceRoot}/.github/workflows/cd.yml"
]
},
"workspaceLayout": { "appsDir": "apps", "libsDir": "libs" },
"nxCloudAccessToken": "NjQ2NjhiMWUtYjA1Ni00NTRjLWJjMjctMjkzNzA1NmRkMTgxfHJlYWQ=",
Expand Down

0 comments on commit 7836805

Please sign in to comment.