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 464c3f9 commit 483e31e
Showing 1 changed file with 16 additions and 15 deletions.
31 changes: 16 additions & 15 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ jobs:
name: build ${{ matrix.os }}-v${{ inputs.build-version }}
steps:

- name: Make Request
id: node-version-request
uses: fjogeleit/http-request-action@v1
with:
url: 'https://nodejs.org/dist/index.json'
method: 'GET'
# - name: Make Request
# id: node-version-request
# uses: fjogeleit/http-request-action@v1
# with:
# url: 'https://nodejs.org/dist/index.json'
# method: 'GET'

# - name: Show Response
# run: |
Expand All @@ -57,15 +57,16 @@ jobs:
try {
const url = 'https://nodejs.org/dist/index.json';
const result = await github.request(url);
let json = JSON.parse( ${{ steps.node-version-request.outputs.response }});
for (const el of json.data.sort()) {
let version = el.version.substring(1, el.version.length) ;
if(version.startsWith(${{ inputs.build-version }})){
console.log(version);
core.setOutput("version", version);
core.setFailed(version);
//return version;
}
console.log(result.data)
//let json = JSON.parse( ${{ steps.node-version-request.outputs.response }});
//for (const el of json.data.sort()) {
// let version = el.version.substring(1, el.version.length) ;
// if(version.startsWith(${{ inputs.build-version }})){
// console.log(version);
// core.setOutput("version", version);
// core.setFailed(version);
// //return version;
// }
}
} catch(err) {
core.error("Error while reading or parsing mochawesome.json")
Expand Down

0 comments on commit 483e31e

Please sign in to comment.