Skip to content

Commit f90b9ea

Browse files
authored
fix some gh actions issues (#32)
* fix some gh actions issues * one more * npm install?
1 parent c5a9867 commit f90b9ea

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

.github/workflows/comments.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
run: "grep -E '^name\\s*\\:' ./src/blog/ -R > posts.txt && cat posts.txt"
1313
- name: deps
1414
run: |
15-
npm install -g js-yaml
15+
npm install js-yaml
1616
- uses: actions/github-script@v3
1717
with:
1818
github-token: ${{secrets.GITHUB_TOKEN}}
@@ -30,8 +30,8 @@ jobs:
3030
let title = nameLine.slice(nameLine.indexOf(':')+1).trim();
3131
let labels = ["blog-post"];
3232
let contents = fs.readFileSync(f).toString().trim();
33-
if contents.startsWith('---') {
34-
const [_, metaString, rest] = contents.split('---', 3);
33+
if (contents.startsWith('---')) {
34+
const [_div, metaString, rest] = contents.split('---', 3);
3535
const meta = yaml.load(metaString);
3636
labels = labels.concat(meta['labels'] || []);
3737
if (meta['name']) {

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
announce:
88
runs-on: ubuntu-latest
99
steps:
10-
- run: npm install -g js-yaml
10+
- run: npm install js-yaml
1111
- uses: actions/github-script@v3
1212
with:
1313
github-token: ${{secrets.GITHUB_TOKEN}}
@@ -31,7 +31,7 @@ jobs:
3131
if (newBlogPosts.length < 1)
3232
return;
3333
34-
const [_, metaString, _] = newBlogPosts[0].patch.split('---', 3);
34+
const [_div, metaString, _rest] = newBlogPosts[0].patch.split('---', 3);
3535
const meta = yaml.load(metaString);
3636
const releaseName = meta['name'];
3737
const slug = meta['slug'] || releaseName.toLowerCase().replace(/\s+/g, "-").replace(/[^a-zA-Z0-9\-]/g, "");

0 commit comments

Comments
 (0)