diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..63cc170 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,32 @@ +name: Continuous Integration + +on: + pull_request: + push: + branches: + - main + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup node + uses: actions/setup-node@v4 + with: + node-version: '20' + + - name: Install dependencies + run: yarn + + - name: Check code format + run: yarn prettier + + - name: Lint + run: yarn lint + + - name: Build + run: yarn build diff --git a/README.md b/README.md index 2a8fdd7..952f295 100644 --- a/README.md +++ b/README.md @@ -31,5 +31,6 @@ jobs: - uses: rematocorp/submodule-status-commenter@v1 with: - github-token: ${{ secrets.GITHUB_TOKEN }} # Make sure this token allows to checkout the submodule + github-token: ${{ secrets.GITHUB_TOKEN }} # Make sure this token can access the submodule + submodule-path: packages/foo # Absolute path to the submodule in the parent repository ``` diff --git a/action.yml b/action.yml index e034853..b6b63af 100644 --- a/action.yml +++ b/action.yml @@ -1,6 +1,6 @@ author: Remato name: Git Submodule Status Commenter -description: GitHub action to comment git submodules current branch and state to the PR +description: GitHub action to comment git submodule status to the PR branding: color: gray-dark icon: git-branch @@ -11,7 +11,6 @@ inputs: submodule-path: description: Path to the submodule directory required: true - default: false runs: using: node20 main: 'dist/index.js'