Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Update example to remove unsupported versions #470

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ This action might work with [self-hosted runners](https://docs.github.com/en/act
if the [Runner Image](https://github.com/actions/runner-images) is very similar to the ones used by GitHub runners. Notably:

* Make sure to use the same operating system and version.
* Set the environment variable `ImageOS` on the runner to the corresponding value on GitHub-hosted runners (e.g. `ubuntu18`/`macos1015`/`win19`). This is necessary to detect the operating system and version.
* Set the environment variable `ImageOS` on the runner to the corresponding value on GitHub-hosted runners (e.g. `ubuntu22`/`macos12`/`win22`). This is necessary to detect the operating system and version.
* Make sure to use the same version of libssl.
* Make sure that the operating system has `libyaml-0` and [`libgmp`](https://stackoverflow.com/questions/26555902/ruby-v-dyld-library-not-loaded-usr-local-lib-libgmp-10-dylib) installed
* The default tool cache directory (`/opt/hostedtoolcache` on Linux, `/Users/runner/hostedtoolcache` on macOS,
Expand Down
6 changes: 3 additions & 3 deletions common.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,12 +171,12 @@ export const supportedPlatforms = [
export function getVirtualEnvironmentName() {
const imageOS = getImageOS()

let match = imageOS.match(/^ubuntu(\d+)/) // e.g. ubuntu18
let match = imageOS.match(/^ubuntu(\d+)/) // e.g. ubuntu22
if (match) {
return `ubuntu-${match[1]}.04`
}

match = imageOS.match(/^macos(\d{2})(\d+)?/) // e.g. macos1015, macos11
match = imageOS.match(/^macos(\d{2})(\d+)?/) // e.g. macos12
if (match) {
if (match[2]) {
return `macos-${match[1]}.${match[2]}`
Expand All @@ -185,7 +185,7 @@ export function getVirtualEnvironmentName() {
}
}

match = imageOS.match(/^win(\d+)/) // e.g. win19
match = imageOS.match(/^win(\d+)/) // e.g. win22
if (match) {
return `windows-20${match[1]}`
}
Expand Down