Skip to content

Commit 00e5d0c

Browse files
authored
Add option to keep runner but still deregister on stop (#9)
1 parent 0de0b1e commit 00e5d0c

File tree

11 files changed

+146729
-65657
lines changed

11 files changed

+146729
-65657
lines changed

.eslintrc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ env:
55
extends:
66
- eslint:recommended
77
parserOptions:
8-
ecmaVersion: 2018
8+
ecmaVersion: 2020
99
sourceType: module
1010
rules:
1111
no-use-before-define: error

.github/workflows/package.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,27 +11,27 @@ jobs:
1111
name: Package distribution files
1212
runs-on: ubuntu-latest
1313
steps:
14-
- id: get-branch
15-
name: Get branch name
16-
run: |
17-
BRANCH=${{ github.ref }}
18-
BRANCH=${BRANCH#"refs/heads/"}
19-
echo "::set-output name=branch-name::${BRANCH}"
2014
- name: Checkout
2115
uses: actions/checkout@v3
2216
with:
23-
ref: ${{ steps.get-branch.outputs.branch-name }}
17+
ref: main
18+
19+
- uses: actions/setup-node@v4
20+
with:
21+
node-version: 20
22+
2423
- name: Install packages
2524
run: npm ci
25+
2626
- name: Run linter
2727
run: npm run lint
28+
2829
- name: Package
2930
run: npm run package
30-
env:
31-
NODE_OPTIONS: --openssl-legacy-provider
31+
3232
- name: Commit
3333
run: |
3434
git config --global user.name "GitHub Actions"
3535
git add dist/
3636
git commit -m "Update dist" || echo "No changes to commit"
37-
git push origin ${{ steps.get-branch.outputs.branch-name }}
37+
git push origin main

README.md

Lines changed: 29 additions & 18 deletions
Large diffs are not rendered by default.

action.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ inputs:
2727
required: false
2828
ec2-instance-type:
2929
description: >-
30-
EC2 Instance Type.
30+
EC2 Instance Type.
3131
This input is required if you use the 'start' mode.
3232
required: false
3333
ec2-instance-count:
@@ -42,7 +42,7 @@ inputs:
4242
required: false
4343
security-group-id:
4444
description: >-
45-
EC2 Security Group Id.
45+
EC2 Security Group Id.
4646
The security group should belong to the same VPC as the specified subnet.
4747
The runners don't require any inbound traffic. However, outbound traffic should be allowed.
4848
This input is required if you use the 'start' mode.
@@ -82,6 +82,16 @@ inputs:
8282
description: >-
8383
Specifies bash commands to run before the runner starts. It's useful for installing dependencies with apt-get, yum, dnf, etc.
8484
required: false
85+
market-type:
86+
description: >-
87+
Specifies the market (purchasing) option for the instance:
88+
- 'spot' - Use a spot instance
89+
required: false
90+
keep-runner-on-stop:
91+
description: >-
92+
If true, keep the runner alive (running) on stop, but still de-register it from GitHub. Useful for debugging failed jobs. Default false.
93+
required: false
94+
default: "false"
8595

8696
outputs:
8797
label:
@@ -96,5 +106,5 @@ outputs:
96106
EC2 Instance Ids of the created runners.
97107
The ids are used to terminate the EC2 instances when the runners are not needed anymore.
98108
runs:
99-
using: node16
109+
using: node20
100110
main: ./dist/index.js

0 commit comments

Comments
 (0)