Skip to content

Commit

Permalink
add up to path
Browse files Browse the repository at this point in the history
  • Loading branch information
markandersontrocme committed Dec 5, 2024
1 parent 71a0bc4 commit 5b3ba08
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
9 changes: 5 additions & 4 deletions dist/index.js

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

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

9 changes: 5 additions & 4 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,12 @@ async function run() {
const url = core.getInput('url')
const token = core.getInput('token')

core.info(`Downloading the Up CLI installation script...`)

// Download the installation script
const downloadPath = await tc.downloadTool(url)

// Make the script executable
fs.chmodSync(downloadPath, '775')

core.info('Running the Up CLI installation script...')
await exec.exec('bash', [downloadPath], {
env: {
...process.env,
Expand All @@ -31,8 +28,12 @@ async function run() {
}
})

const cachedPath = await tc.cacheDir('./up', 'up', version)

core.addPath(cachedPath)

core.info('Verifying installation...')
await exec.exec('up', ['--version'])
await exec.exec('up', ['version'])

if (token) {
core.info('Logging in to Upbound...')
Expand Down

0 comments on commit 5b3ba08

Please sign in to comment.