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

Skip to content

Commit 5bfdaae

Browse files
committed
Remove readme template
1 parent ee50858 commit 5bfdaae

File tree

2 files changed

+13
-109
lines changed

2 files changed

+13
-109
lines changed

README.md

Lines changed: 7 additions & 108 deletions
Original file line numberDiff line numberDiff line change
@@ -1,113 +1,12 @@
1+
# Action Debugger
12

2-
<p align="center">
3-
<a href="https://github.com/actions/javascript-action"><img alt="GitHub Actions status" src="https://github.com/actions/javascript-action/workflows/test-local/badge.svg"></a>
4-
</p>
3+
Interactive debugger for GitHub Actions
54

6-
# Create a JavaScript Action
5+
## Acknowledgments
76

8-
Use this template to bootstrap the creation of a JavaScript action.:rocket:
7+
* [tmate.io](https://tmate.io)
8+
* Max Schmitt's [action-tmate](https://github.com/mxschmitt/action-tmate)
99

10-
This template includes tests, linting, a validation workflow, publishing, and versioning guidance.
10+
### License
1111

12-
If you are new, there's also a simpler introduction. See the [Hello World JavaScript Action](https://github.com/actions/hello-world-javascript-action)
13-
14-
## Create an action from this template
15-
16-
Click the `Use this Template` and provide the new repo details for your action
17-
18-
## Code in Master
19-
20-
Install the dependencies
21-
```bash
22-
$ npm install
23-
```
24-
25-
Run the tests :heavy_check_mark:
26-
```bash
27-
$ npm test
28-
29-
PASS ./index.test.js
30-
✓ throws invalid number (3ms)
31-
wait 500 ms (504ms)
32-
test runs (95ms)
33-
34-
...
35-
```
36-
37-
## Change action.yml
38-
39-
The action.yml contains defines the inputs and output for your action.
40-
41-
Update the action.yml with your name, description, inputs and outputs for your action.
42-
43-
See the [documentation](https://help.github.com/en/articles/metadata-syntax-for-github-actions)
44-
45-
## Change the Code
46-
47-
Most toolkit and CI/CD operations involve async operations so the action is run in an async function.
48-
49-
```javascript
50-
const core = require('@actions/core');
51-
...
52-
53-
async function run() {
54-
try {
55-
...
56-
}
57-
catch (error) {
58-
core.setFailed(error.message);
59-
}
60-
}
61-
62-
run()
63-
```
64-
65-
See the [toolkit documentation](https://github.com/actions/toolkit/blob/master/README.md#packages) for the various packages.
66-
67-
## Publish to a distribution branch
68-
69-
Actions are run from GitHub repos. We will create a releases branch and only checkin production modules (core in this case).
70-
71-
Comment out node_modules in .gitignore and create a releases/v1 branch
72-
```bash
73-
# comment this out distribution branches
74-
# node_modules/
75-
```
76-
77-
```bash
78-
$ git checkout -b releases/v1
79-
$ git commit -a -m "prod dependencies"
80-
```
81-
82-
```bash
83-
$ npm prune --production
84-
$ git add node_modules
85-
$ git commit -a -m "prod dependencies"
86-
$ git push origin releases/v1
87-
```
88-
89-
Your action is now published! :rocket:
90-
91-
See the [versioning documentation](https://github.com/actions/toolkit/blob/master/docs/action-versioning.md)
92-
93-
## Validate
94-
95-
You can now validate the action by referencing the releases/v1 branch
96-
97-
```yaml
98-
uses: actions/javascript-action@releases/v1
99-
with:
100-
milliseconds: 1000
101-
```
102-
103-
See the [actions tab](https://github.com/actions/javascript-action/actions) for runs of this action! :rocket:
104-
105-
## Usage:
106-
107-
After testing you can [create a v1 tag](https://github.com/actions/toolkit/blob/master/docs/action-versioning.md) to reference the stable and tested action
108-
109-
```yaml
110-
uses: actions/javascript-action@v1
111-
with:
112-
milliseconds: 1000
113-
```
12+
The action and associated scripts and documentation in this project are released under the MIT License.

script.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,15 @@ tmate -S /tmp/tmate.sock wait tmate-ready
2323
echo To connect to this session copy-n-paste the following into a terminal:
2424
tmate -S /tmp/tmate.sock display -p '#{tmate_ssh}'
2525

26+
echo "echo hi from debugger" >> ~/.bash_profile
27+
2628
# Wait for connection to close or timeout in 15 min
2729
timeout=$((15*60))
2830
while [ -S /tmp/tmate.sock ]; do
2931
sleep 1
3032
timeout=$(($timeout-1))
31-
[ $timeout -gt 0 ] || exit 1
33+
if (( timeout < 0 )); then
34+
echo Waiting on tmate connection timed out!
35+
exit 1
36+
fi
3237
done

0 commit comments

Comments
 (0)