generated from pabio/github-actions-starter
-
Notifications
You must be signed in to change notification settings - Fork 142
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🐛 Add temporary bug fix (upptime/upptime#56)
- Loading branch information
1 parent
a7087ef
commit c6f6376
Showing
2 changed files
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { readdir, readFile, writeFile } from "fs-extra"; | ||
import { join } from "path"; | ||
|
||
export const tempFixes = async () => { | ||
console.log("[warn] Applying temporary fixes"); | ||
console.log("[warn] Changing Node.js version in CI"); | ||
|
||
const workflows = await readdir(join(".", ".github", "workflows")); | ||
for await (const file of workflows) { | ||
if (file.endsWith(".yml")) { | ||
const contents = await readFile(join(".", ".github", "workflows", file), "utf8"); | ||
await writeFile( | ||
join(".", ".github", "workflows", file), | ||
contents.replace("actions/[email protected]", "actions/[email protected]") | ||
); | ||
} | ||
} | ||
}; |