-
Notifications
You must be signed in to change notification settings - Fork 122
{action.yml,.github}: add support for windows #160
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
Conversation
action.yml
Outdated
| if [ "{{ runner.os }}" == "Linux" ]; then | ||
| HOSTNAME="github-$(cat /etc/hostname)" | ||
| elif [ "{{ runner.os }}" == "Windows" ]; then | ||
| HOSTNAME="github-$COMPUTERNAME" | ||
| fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing $s in front of the braces
| if [ "{{ runner.os }}" == "Linux" ]; then | |
| HOSTNAME="github-$(cat /etc/hostname)" | |
| elif [ "{{ runner.os }}" == "Windows" ]; then | |
| HOSTNAME="github-$COMPUTERNAME" | |
| fi | |
| if [ "${{ runner.os }}" == "Linux" ]; then | |
| HOSTNAME="github-$(cat /etc/hostname)" | |
| elif [ "${{ runner.os }}" == "Windows" ]; then | |
| HOSTNAME="github-$COMPUTERNAME" | |
| fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah thanks, good catch!
07c60d3 to
c29cd81
Compare
action.yml
Outdated
| VERSION=$(curl -s "https://pkgs.tailscale.com/stable/?mode=json" | jq -r .Version) | ||
| echo "Latest Tailscale version: $VERSION" | ||
| fi | ||
| if [ X64 = "ARM64" ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this X64 variable? Shouldn't it be runner.arch?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh yup definitely should be, will fix.
c29cd81 to
5be1273
Compare
oxtoacart
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just a couple of nitpicky suggestions.
action.yml
Outdated
| TS_ARCH="arm64" | ||
| elif [ ${{ runner.arch }} = "X86" ]; then | ||
| TS_ARCH="x86" | ||
| elif [ ${{ runner.arch }} = "X64" ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: given the below else, you could skip this one.
action.yml
Outdated
| SHA256SUM: ${{ inputs.sha256sum }} | ||
| run: | | ||
| if [ "$VERSION" = "latest" ]; then | ||
| VERSION=$(curl -s "https://pkgs.tailscale.com/stable/?mode=json" | jq -r .Version) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed you used -H user-agent:tailscale-github-action in a curl further down. Want to do it here too?
| URL="https://pkgs.tailscale.com/unstable/tailscale-setup-${VERSION}-${TS_ARCH}.msi" | ||
| fi | ||
| echo "Downloading $URL" | ||
| curl -H user-agent:tailscale-github-action -L "$URL" -o tailscale.msi --max-time 300 --fail |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the custom user-agent here!
Add support for running the action on windows-based GitHub runners. Updates #157
5be1273 to
5dddea1
Compare
Add support for running the action on windows-based GitHub runners.
Updates #157