Skip to content

Commit

Permalink
docs: ✏️ update readme (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kusnierz authored Oct 9, 2024
1 parent e18ed7c commit d7a2692
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 0 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
### Node.js Github Composite Actions

This is a set of composite actions for Node.js projects. It includes the following actions:
- [Build and push Docker image](build-and-push-docker-image)
- [Deployment status report in Github](deployment-status)
- [NPM dependencies install](npm-install)
- [Heroku deployment](heroku-deploy) (deprecated)
- [Heroku review app deployment](heroku-review-app-deploy) (deprecated)
- [Yarn dependencies install](yarn-install)
27 changes: 27 additions & 0 deletions npm-install/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
### NPM dependencies install composite action

This composite action installs NPM dependencies for a Node.js project.
It leverages cached NPM dependencies to speed up the process if there are no changes in the dependencies.

This action will also add a comment in the PR if the Node.js version specified in the `engines` field in the `package.json` file should be updated.

#### Usage

```yaml
uses: actions/npm-install@v2
with:
# Required. NPM token for the Debitoor NPM registry.
debitoor-npm-token: ${{ secrets.DEBITOOR_NPM_TOKEN }}
# Optional. NPM token for the SumUp NPM registry.
# If secret names are different, you can provide them both as below.
sumup-npm-token: ${{ secrets.GH_PACKAGES_TOKEN != '' && secrets.GH_PACKAGES_TOKEN || secrets.READ_PACKAGES_PAT }}
# Optional: SSH private key used to install NPM packages referenced by SSH URLs.
gh-ssh-private-key: ${{ secrets.GH_SSH_PRIVATE_KEY }}
gh-ssh-known-hosts: ${{ secrets.KNOWN_HOSTS }}
# Optional. Set to true to use npm ci instead of npm install.
# Default: true
npm-ci-install: true
# Optional. Additional flags to pass to the npm ci or npm install command.
# Example: --legacy-peer-deps
npm-command-flags: ''
```
10 changes: 10 additions & 0 deletions npm-install/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -167,10 +167,20 @@ runs:
# remove anything after the first dot from NODE_VERSION and then compare it. 'bc' returns 1 if condition is true
run: echo outdated-node-version=$(echo "${NODE_VERSION//.*/} < 18" | bc) >> $GITHUB_OUTPUT

- if: always() && fromJSON(steps.determine-old-node-version.outputs.outdated-node-version)
name: Find old NodeJs version comment
uses: peter-evans/find-comment@3eae4d37986fb5a8592848f6a574fdf654e61f9e # v3.1.0
id: find-old-node-version-comment
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'github-actions[bot]'
body-includes: is not supported anymore or close to end of support and should be bumped

- if: always() && fromJSON(steps.determine-old-node-version.outputs.outdated-node-version)
name: Comment old NodeJs version
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v.4.0.0
with:
comment-id: ${{ steps.find-old-node-version-comment.outputs.comment-id }}
issue-number: ${{ github.event.number }}
edit-mode: replace
body: |
Expand Down

0 comments on commit d7a2692

Please sign in to comment.