Skip to content

Commit

Permalink
separate execution and run function, bump release workflow hash (#109)
Browse files Browse the repository at this point in the history
* separate execution from run function to stop prematurely failing tests

* update release workflow hash

* audit fix

* explicit empty cluster name
  • Loading branch information
davidgamero authored Feb 9, 2024
1 parent a3cc9fc commit fefe3c0
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 43 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ on:

jobs:
release:
uses: Azure/action-release-workflows/.github/workflows/release_js_project.yaml@81e6a8ed41ced9d131dea884ecae7b8c6dc4f799
uses: Azure/action-release-workflows/.github/workflows/release_js_project.yaml@a705b2ab6a3ee889f2b0d925ad0bd2f9eb733ce6
with:
changelogPath: ./CHANGELOG.md
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ inputs:
branding:
color: 'green'
runs:
using: 'node16'
using: 'node20'
main: 'lib/index.js'
76 changes: 38 additions & 38 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"private": true,
"main": "lib/login.js",
"scripts": {
"build": "ncc build src/run.ts -o lib",
"build": "ncc build src/index.ts -o lib",
"test": "jest",
"test-coverage": "jest --coverage",
"format": "prettier --write .",
Expand Down
4 changes: 4 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import {run} from './run'
import * as core from '@actions/core'

run().catch(core.setFailed)
1 change: 1 addition & 0 deletions src/run.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ describe('Set context', () => {
.spyOn(core, 'getInput')
.mockImplementation((inputName, options) => {
if (inputName == 'resource-group') return resourceGroup
if (inputName == 'cluster-name') return ''
})
await expect(run()).rejects.toThrow()
},
Expand Down
2 changes: 0 additions & 2 deletions src/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,5 +104,3 @@ function getUserAgent(prevUserAgent: string): string {
if (prevUserAgent) return `${prevUserAgent}+${newUserAgent}`
return newUserAgent
}

run().catch(core.setFailed)

0 comments on commit fefe3c0

Please sign in to comment.