Skip to content

Commit

Permalink
Merge pull request #27 from loilo-inc/bump-node20
Browse files Browse the repository at this point in the history
Bump: Node20
  • Loading branch information
juri-t authored Feb 1, 2024
2 parents 9ff6449 + da597c0 commit 65cc8c9
Show file tree
Hide file tree
Showing 8 changed files with 36,108 additions and 12,034 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "16"
node-version: "20"
- run: yarn install
- name: Check lib
run: |
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ inputs:
description: "Canarycage version. If no version specified, the latest version will be used automatically."
required: false
runs:
using: 'node16'
using: 'node20'
main: 'lib/index.js'
18 changes: 10 additions & 8 deletions index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as core from "@actions/core";
import * as io from "@actions/io"
import {downloadCage, getLatestVersion} from "./src/setup";
import * as io from "@actions/io";
import { downloadCage, getLatestVersion } from "./src/setup";

function assertInput(name: string): string {
const v = core.getInput(name);
Expand All @@ -14,21 +14,23 @@ async function main() {
try {
const token = assertInput("github-token");
let version = core.getInput("cage-version");
const latestVersion = await getLatestVersion(token)
const latestVersion = await getLatestVersion(token);
if (!version) {
version = latestVersion
core.info(`No version specified. Using latest version: ${version}`)
version = latestVersion;
core.info(`No version specified. Using latest version: ${version}`);
} else if (version !== latestVersion) {
core.warning(`New version of cage found: current=${version}, latest=${latestVersion}`)
core.warning(
`New version of cage found: current=${version}, latest=${latestVersion}`,
);
}
if (!(await io.which("cage", false))) {
await downloadCage({version});
await downloadCage({ version });
}
} catch (e) {
if (e instanceof Error) {
console.error(e);
}
core.setFailed('see error above');
core.setFailed("see error above");
}
}

Expand Down
Loading

0 comments on commit 65cc8c9

Please sign in to comment.