Skip to content

Commit

Permalink
updating GitHub pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
agracio committed Sep 18, 2024
1 parent a36a846 commit 72ea134
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ jobs:
script: |
try {
const script = require('./tools/getNodeVersion.js')
await script({${{ inputs.build-version }}, core})
//await script({github, context, core})
//await script({${{ inputs.build-version }}, core})
await script({github, context, core})
core.setFailed('done')
} catch(err) {
core.error("Error while reading or parsing mochawesome.json")
Expand Down
4 changes: 2 additions & 2 deletions tools/getNodeVersion.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var {http} = require('follow-redirects');

module.exports = async ({majorVersion, core}) => {
module.exports = async ({github, context, core}) => {
let url = 'http://nodejs.org/dist/index.json';

http.get(url,(res) => {
Expand All @@ -20,7 +20,7 @@ module.exports = async ({majorVersion, core}) => {

for (const el of json.sort()) {
let version = el.version.substring(1, el.version.length) ;
if(version.startsWith(majorVersion)){
if(version.startsWith('20')){
console.log(version)
core.setOutput("version", version);
}
Expand Down

0 comments on commit 72ea134

Please sign in to comment.