Skip to content

Commit

Permalink
add cd script
Browse files Browse the repository at this point in the history
Signed-off-by: Mirko Mollik <[email protected]>
  • Loading branch information
cre8 committed May 13, 2024
1 parent c852ef2 commit ae5901b
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 6 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: CD

on:
push:
branches:
- main

permissions:
actions: read
contents: read

jobs:
main:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: pnpm/action-setup@v3
with:
version: 8

# Cache node_modules
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
- run: pnpm install --frozen-lockfile
- uses: nrwl/nx-set-shas@v4
- name: Build and push images
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
INPUT_PUSH: true
run: pnpm exec nx affected -t container
11 changes: 5 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
name: CI

on:
push:
pull_request:
branches:
- main
pull_request:

permissions:
actions: read
Expand All @@ -29,7 +28,7 @@ jobs:
cache: 'pnpm'
- run: pnpm install --frozen-lockfile
- uses: nrwl/nx-set-shas@v4

# Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud
# - run: pnpm exec nx-cloud record -- echo Hello World
- run: INPUT_GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} pnpm exec nx affected -t lint test build container
- name: Lint, test, build, and container
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: pnpm exec nx affected -t lint test build container

0 comments on commit ae5901b

Please sign in to comment.