-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (42 loc) · 1.24 KB
/
action.yml
File metadata and controls
51 lines (42 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Build and Test Action
on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
jobs:
build-action:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v5
with:
node-version: '24'
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 8
- name: Install dependencies
run: pnpm install
- name: Build action
run: pnpm run build:action
- name: Test action locally
run: |
# Test the action with a sample commit
echo "Testing action with token: ${INPUT_GITHUB_TOKEN:0:10}..."
node dist/action.cjs || echo "Action test completed (expected to fail without proper setup)"
env:
INPUT_GITHUB-TOKEN: ${{ secrets.GITHUB_TOKEN }}
INPUT_CONFIG-PATH: '.commit-coach.yml'
GITHUB_REPOSITORY: ${{ github.repository }}
GITHUB_SHA: ${{ github.sha }}
- name: Upload action artifacts
uses: actions/upload-artifact@v4
with:
name: action-dist
path: dist/
retention-days: 30