@codfish/actions 2.0.0 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -25,8 +25,8 @@ Reference actions using the following format:
25
25
 
26
26
  ```yaml
27
27
  uses: codfish/actions/{action-name}@main
28
- uses: codfish/actions/{action-name}@v1
29
- uses: codfish/actions/{action-name}@v1.0.1
28
+ uses: codfish/actions/{action-name}@v2
29
+ uses: codfish/actions/{action-name}@v2.0.1
30
30
  uses: codfish/actions/{action-name}@feature-branch
31
31
  uses: codfish/actions/{action-name}@aff1a9d
32
32
  ```
@@ -51,7 +51,7 @@ Creates or updates a comment in a pull request with optional tagging for upsert
51
51
 
52
52
  ```yaml
53
53
  - name: Comment on PR
54
- uses: codfish/actions/comment@v1
54
+ uses: codfish/actions/comment@v2
55
55
  with:
56
56
  message: '✅ Build successful!'
57
57
  tag: 'build-status'
@@ -86,13 +86,13 @@ automatically comments on PR
86
86
  steps:
87
87
  - uses: actions/checkout@v5
88
88
 
89
- - uses: codfish/actions/setup-node-and-install@v1
89
+ - uses: codfish/actions/setup-node-and-install@v2
90
90
  with:
91
91
  node-version: lts/*
92
92
 
93
93
  - run: npm run build
94
94
 
95
- - uses: codfish/actions/npm-pr-version@v1
95
+ - uses: codfish/actions/npm-pr-version@v2
96
96
  with:
97
97
  npm-token: ${{ secrets.NPM_TOKEN }}
98
98
  github-token: ${{ secrets.GITHUB_TOKEN }}
@@ -124,7 +124,7 @@ steps:
124
124
  - uses: actions/checkout@v5
125
125
 
126
126
  # will install latest Node v18.x
127
- - uses: codfish/actions/setup-node-and-install@v1
127
+ - uses: codfish/actions/setup-node-and-install@v2
128
128
  with:
129
129
  node-version: 18
130
130
  cache-key-suffix: '-${{ github.head_ref || github.event.release.tag_name }}'
@@ -159,7 +159,7 @@ jobs:
159
159
  steps:
160
160
  - uses: actions/checkout@v5
161
161
 
162
- - uses: codfish/actions/setup-node-and-install@v1
162
+ - uses: codfish/actions/setup-node-and-install@v2
163
163
  with:
164
164
  node-version: 'lts/*'
165
165
 
@@ -191,7 +191,7 @@ jobs:
191
191
  echo "size=$size" >> $GITHUB_OUTPUT
192
192
  id: build
193
193
 
194
- - uses: codfish/actions/comment@v1
194
+ - uses: codfish/actions/comment@v2
195
195
  with:
196
196
  message: |
197
197
  ## 🚀 **Build Summary**
@@ -204,7 +204,7 @@ jobs:
204
204
  tag: 'build-summary'
205
205
  upsert: true
206
206
 
207
- - uses: codfish/actions/npm-pr-version@v1
207
+ - uses: codfish/actions/npm-pr-version@v2
208
208
  with:
209
209
  npm-token: ${{ secrets.NPM_TOKEN }}
210
210
  github-token: ${{ secrets.GITHUB_TOKEN }}
package/SECURITY.md CHANGED
@@ -90,7 +90,7 @@ When using these GitHub Actions in your workflows:
90
90
 
91
91
  ```yaml
92
92
  # ✅ Good - Using secrets properly
93
- - uses: codfish/actions/npm-pr-version@v1
93
+ - uses: codfish/actions/npm-pr-version@v2
94
94
  with:
95
95
  npm-token: ${{ secrets.NPM_TOKEN }}
96
96
  github-token: ${{ secrets.GITHUB_TOKEN }}
@@ -107,7 +107,7 @@ When using these GitHub Actions in your workflows:
107
107
 
108
108
  ```yaml
109
109
  # ✅ Good - Pinned version
110
- - uses: codfish/actions/setup-node-and-install@v1.2.3
110
+ - uses: codfish/actions/setup-node-and-install@v2.2.3
111
111
 
112
112
  # ⚠️ Caution - Latest main (testing only)
113
113
  - uses: codfish/actions/setup-node-and-install@main
@@ -84,7 +84,7 @@ class DocumentationGenerator {
84
84
 
85
85
  // If it doesn't start with a step name, add one
86
86
  if (!example.match(/^\s*-\s*name:/m) && !example.match(/^\s*-\s*uses:/m)) {
87
- return `- uses: codfish/actions/${dirName}@v1\n${example.replace(/^/gm, ' ')}`;
87
+ return `- uses: codfish/actions/${dirName}@v2\n${example.replace(/^/gm, ' ')}`;
88
88
  }
89
89
 
90
90
  return example;
@@ -103,7 +103,7 @@ class DocumentationGenerator {
103
103
  * Generate a basic usage example based on action inputs
104
104
  */
105
105
  generateBasicExample(dirName, inputs = {}) {
106
- let example = `- uses: codfish/actions/${dirName}@v1`;
106
+ let example = `- uses: codfish/actions/${dirName}@v2`;
107
107
 
108
108
  const inputKeys = Object.keys(inputs);
109
109
  if (inputKeys.length > 0) {
package/comment/README.md CHANGED
@@ -10,7 +10,7 @@ See [action.yml](action.yml).
10
10
 
11
11
  ```yaml
12
12
  - name: Comment on PR
13
- uses: codfish/actions/comment@v1
13
+ uses: codfish/actions/comment@v2
14
14
  with:
15
15
  message: '✅ Build successful!'
16
16
  tag: 'build-status'
@@ -34,7 +34,7 @@ See [action.yml](action.yml).
34
34
  ### Basic comment
35
35
 
36
36
  ```yaml
37
- - uses: codfish/actions/comment@v1
37
+ - uses: codfish/actions/comment@v2
38
38
  with:
39
39
  message: 'Hello from GitHub Actions! 👋'
40
40
  ```
@@ -45,7 +45,7 @@ Use the `upsert` feature to update the same comment instead of creating multiple
45
45
 
46
46
  ```yaml
47
47
  - name: Update build status
48
- uses: codfish/actions/comment@v1
48
+ uses: codfish/actions/comment@v2
49
49
  with:
50
50
  message: |
51
51
  ## Build Status
@@ -55,7 +55,7 @@ Use the `upsert` feature to update the same comment instead of creating multiple
55
55
 
56
56
  # Later in the workflow...
57
57
  - name: Update build status
58
- uses: codfish/actions/comment@v1
58
+ uses: codfish/actions/comment@v2
59
59
  with:
60
60
  message: |
61
61
  ## Build Status
@@ -67,7 +67,7 @@ Use the `upsert` feature to update the same comment instead of creating multiple
67
67
  ### Multi-line markdown comment
68
68
 
69
69
  ```yaml
70
- - uses: codfish/actions/comment@v1
70
+ - uses: codfish/actions/comment@v2
71
71
  with:
72
72
  message: |
73
73
  ## 📊 Test Results
@@ -23,13 +23,13 @@ See [action.yml](action.yml).
23
23
  steps:
24
24
  - uses: actions/checkout@v5
25
25
 
26
- - uses: codfish/actions/setup-node-and-install@v1
26
+ - uses: codfish/actions/setup-node-and-install@v2
27
27
  with:
28
28
  node-version: lts/*
29
29
 
30
30
  - run: npm run build
31
31
 
32
- - uses: codfish/actions/npm-pr-version@v1
32
+ - uses: codfish/actions/npm-pr-version@v2
33
33
  with:
34
34
  npm-token: ${{ secrets.NPM_TOKEN }}
35
35
  github-token: ${{ secrets.GITHUB_TOKEN }}
@@ -38,7 +38,7 @@ steps:
38
38
  ### Disable PR Comments
39
39
 
40
40
  ```yaml
41
- - uses: codfish/actions/npm-pr-version@v1
41
+ - uses: codfish/actions/npm-pr-version@v2
42
42
  with:
43
43
  npm-token: ${{ secrets.NPM_TOKEN }}
44
44
  github-token: ${{ secrets.GITHUB_TOKEN }}
@@ -48,7 +48,7 @@ steps:
48
48
  ### Custom Comment Tag
49
49
 
50
50
  ```yaml
51
- - uses: codfish/actions/npm-pr-version@v1
51
+ - uses: codfish/actions/npm-pr-version@v2
52
52
  with:
53
53
  npm-token: ${{ secrets.NPM_TOKEN }}
54
54
  github-token: ${{ secrets.GITHUB_TOKEN }}
@@ -72,7 +72,7 @@ jobs:
72
72
  steps:
73
73
  - uses: actions/checkout@v5
74
74
 
75
- - uses: codfish/actions/setup-node-and-install@v1
75
+ - uses: codfish/actions/setup-node-and-install@v2
76
76
  with:
77
77
  node-version: 'lts/*'
78
78
 
@@ -80,7 +80,7 @@ jobs:
80
80
  run: npm run build
81
81
 
82
82
  - name: Publish PR package
83
- uses: codfish/actions/npm-pr-version@v1
83
+ uses: codfish/actions/npm-pr-version@v2
84
84
  with:
85
85
  npm-token: ${{ secrets.NPM_TOKEN }}
86
86
  github-token: ${{ secrets.GITHUB_TOKEN }}
@@ -35,7 +35,7 @@ runs:
35
35
  using: composite
36
36
 
37
37
  steps:
38
- - uses: codfish/actions/comment@v1
38
+ - uses: codfish/actions/comment@v2
39
39
  if: inputs.comment == 'true'
40
40
  with:
41
41
  message: ⏳ Publishing PR version...
@@ -155,7 +155,7 @@ runs:
155
155
  PR: ${{ github.event.number }}
156
156
  SHA: ${{ github.event.pull_request.head.sha }}
157
157
 
158
- - uses: codfish/actions/comment@v1
158
+ - uses: codfish/actions/comment@v2
159
159
  if: failure() && inputs.comment == 'true'
160
160
  with:
161
161
  message: |
@@ -167,7 +167,7 @@ runs:
167
167
  upsert: true
168
168
  tag: ${{ inputs.comment-tag }}
169
169
 
170
- - uses: codfish/actions/comment@v1
170
+ - uses: codfish/actions/comment@v2
171
171
  if: success() && inputs.comment == 'true'
172
172
  with:
173
173
  message: |
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "description": "Composite GitHub Actions for my projects.",
5
5
  "author": "Chris O'Donnell <chris@codfish.dev>",
6
6
  "license": "MIT",
7
- "version": "2.0.0",
7
+ "version": "2.0.1",
8
8
  "publishConfig": {
9
9
  "access": "public"
10
10
  },
@@ -22,7 +22,7 @@ steps:
22
22
  - uses: actions/checkout@v5
23
23
 
24
24
  # will install latest Node v18.x
25
- - uses: codfish/actions/setup-node-and-install@v1
25
+ - uses: codfish/actions/setup-node-and-install@v2
26
26
  with:
27
27
  node-version: 18
28
28
  cache-key-suffix: '-${{ github.head_ref || github.event.release.tag_name }}'
@@ -52,7 +52,7 @@ v18.14.1
52
52
  steps:
53
53
  - uses: actions/checkout@v5
54
54
  # will install Node v18.14.1
55
- - uses: codfish/actions/setup-node-and-install@v1
55
+ - uses: codfish/actions/setup-node-and-install@v2
56
56
  - run: npm test
57
57
  ```
58
58
 
@@ -67,7 +67,7 @@ steps:
67
67
  steps:
68
68
  - uses: actions/checkout@v5
69
69
  # will install Node v20.10.0
70
- - uses: codfish/actions/setup-node-and-install@v1
70
+ - uses: codfish/actions/setup-node-and-install@v2
71
71
  - run: npm test
72
72
  ```
73
73
 
@@ -105,7 +105,7 @@ The action automatically detects your package manager:
105
105
  ### With specific Node version
106
106
 
107
107
  ```yaml
108
- - uses: codfish/actions/setup-node-and-install@v1
108
+ - uses: codfish/actions/setup-node-and-install@v2
109
109
  with:
110
110
  node-version: '18'
111
111
  ```
@@ -113,7 +113,7 @@ The action automatically detects your package manager:
113
113
  ### With pnpm in subdirectory
114
114
 
115
115
  ```yaml
116
- - uses: codfish/actions/setup-node-and-install@v1
116
+ - uses: codfish/actions/setup-node-and-install@v2
117
117
  with:
118
118
  working-directory: './frontend'
119
119
  install-options: '--frozen-lockfile'
@@ -122,7 +122,7 @@ The action automatically detects your package manager:
122
122
  ### With custom cache key
123
123
 
124
124
  ```yaml
125
- - uses: codfish/actions/setup-node-and-install@v1
125
+ - uses: codfish/actions/setup-node-and-install@v2
126
126
  with:
127
127
  cache-key-suffix: '-${{ github.head_ref }}'
128
128
  ```
@@ -137,5 +137,5 @@ Replace multiple setup steps with this single action:
137
137
  - node-version-file: '.nvmrc'
138
138
  - cache: 'npm'
139
139
  - - run: npm ci --prefer-offline --no-audit
140
- + - uses: codfish/actions/setup-node-and-install@v1
140
+ + - uses: codfish/actions/setup-node-and-install@v2
141
141
  ```
@@ -116,11 +116,13 @@ runs:
116
116
  node-version: ${{ steps.detect-node-version.outputs.version }}
117
117
  registry-url: 'https://registry.npmjs.org'
118
118
 
119
- # apply `./node_modules` cache only if a lockfile is present
119
+ # Apply `./node_modules` cache only if a lockfile is present and using `npm`
120
120
  # Will remove the need to run install commands twice. Risk reduced by using a very specific cache key.
121
121
  # Cache wont be used if the lockfile changes, package manager, node version, or OS changes.
122
122
  - name: Setup node_modules dependency cache
123
- if: steps.detect-package-manager.outputs.lockfile-exists == 'true'
123
+ if:
124
+ steps.detect-package-manager.outputs.lockfile-exists == 'true' &&
125
+ steps.detect-package-manager.outputs.package-manager == 'npm'
124
126
  uses: actions/cache@v4
125
127
  id: cache
126
128
  with: