Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Node 18 #3

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Container image that runs your code
FROM node:14-alpine
FROM node:18-alpine

# Copies your code file from your action repository to the filesystem path `/` of the container
COPY entrypoint.sh /entrypoint.sh
Expand Down
16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,26 @@

A shared github action for our PR's : node setup, running unit tests and linting scripts

This Dockerized action is using **Node v14**
This Dockerized action is using **Node v18**

## What it does

- Installs the dependencies as defined in your project's `package.json`
- Runs unit tests : `npm run test`
- Runs linting : `npm run lint`

## Setup

1. Your project should have a `package.json` file that contains these scripts:

- `test`
- `lint`

In case they are not present the action will NOT execute them 😄

2. In your action make sure to configure the env variable of `PRIVATE_REPO_PAT`
- This is used for installing private packages

- This is used for installing private packages

## Example Usage

Expand All @@ -32,7 +35,7 @@ jobs:
name: Test the action
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: LoveToKnow/ltk-pr-action@main
env:
PRIVATE_REPO_PAT: ${{ secrets.PRIVATE_REPO_PAT }}
Expand All @@ -49,9 +52,9 @@ jobs:
test_action:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Cache node_modules
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: |
node_modules
Expand All @@ -62,5 +65,4 @@ jobs:
- uses: LoveToKnow/ltk-pr-action@main
env:
PRIVATE_REPO_PAT: ${{ secrets.PRIVATE_REPO_PAT }}

```
```