Skip to content

Commit a4a5620

Browse files
authored
Merge pull request #1 from timheuer/v1
Updating readme
2 parents 00b8e86 + 1d4f53a commit a4a5620

File tree

4 files changed

+17
-150
lines changed

4 files changed

+17
-150
lines changed

README.md

Lines changed: 9 additions & 109 deletions
Original file line numberDiff line numberDiff line change
@@ -1,114 +1,14 @@
1+
# Base63 to File
12

2-
<p align="center">
3-
<a href="https://github.com/actions/javascript-action/actions"><img alt="javscript-action status" src="https://github.com/actions/javascript-action/workflows/units-test/badge.svg"></a>
4-
</p>
5-
6-
# Create a JavaScript Action
7-
8-
Use this template to bootstrap the creation of a JavaScript action.:rocket:
9-
10-
This template includes tests, linting, a validation workflow, publishing, and versioning guidance.
11-
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-
## Package for distribution
68-
69-
GitHub Actions will run the entry point from the action.yml. Packaging assembles the code into one file that can be checked in to Git, enabling fast and reliable execution and preventing the need to check in node_modules.
70-
71-
Actions are run from GitHub repos. Packaging the action will create a packaged action in the dist folder.
72-
73-
Run package
74-
75-
```bash
76-
npm run package
77-
```
78-
79-
Since the packaged index.js is run from the dist folder.
80-
81-
```bash
82-
git add dist
83-
```
84-
85-
## Create a release branch
86-
87-
Users shouldn't consume the action from master since that would be latest code and actions can break compatibility between major versions.
88-
89-
Checkin to the v1 release branch
90-
91-
```bash
92-
$ git checkout -b v1
93-
$ git commit -a -m "v1 release"
94-
```
95-
96-
```bash
97-
$ git push origin v1
98-
```
99-
100-
Your action is now published! :rocket:
101-
102-
See the [versioning documentation](https://github.com/actions/toolkit/blob/master/docs/action-versioning.md)
3+
Use this action if you need to get a file from a base64-encoded string that you may be storing in Secrets or elsewhere. This can be useful for certificate signing and storing the base64 cert in the Secrets.
1034

1045
## Usage
1056

106-
You can now consume the action by referencing the v1 branch
107-
108-
```yaml
109-
uses: actions/javascript-action@v1
110-
with:
111-
milliseconds: 1000
1127
```
113-
114-
See the [actions tab](https://github.com/actions/javascript-action/actions) for runs of this action! :rocket:
8+
- name: Run Workflow
9+
id: write_file
10+
uses: ./
11+
with:
12+
fileName: 'myTemporaryFile.txt'
13+
encodedString: ${{ secrets.SOME_ENCODED_STRING }}
14+
```

index.test.js

Lines changed: 0 additions & 23 deletions
This file was deleted.

package.json

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"name": "javascript-action",
2+
"name": "base64-to-file",
33
"version": "1.0.0",
4-
"description": "JavaScript Action Template",
4+
"description": "base64 encoded string to a file",
55
"main": "index.js",
66
"scripts": {
77
"lint": "eslint index.js",
@@ -10,19 +10,20 @@
1010
},
1111
"repository": {
1212
"type": "git",
13-
"url": "git+https://github.com/actions/javascript-action.git"
13+
"url": "git+https://github.com/timheuer/base64-to-file.git"
1414
},
1515
"keywords": [
1616
"GitHub",
1717
"Actions",
18-
"JavaScript"
18+
"JavaScript",
19+
"base64"
1920
],
20-
"author": "GitHub",
21+
"author": "Tim Heuer",
2122
"license": "MIT",
2223
"bugs": {
23-
"url": "https://github.com/actions/javascript-action/issues"
24+
"url": "https://github.com/timheuer/base64-to-file/issues"
2425
},
25-
"homepage": "https://github.com/actions/javascript-action#readme",
26+
"homepage": "https://github.com/timheuer/base64-to-file#readme",
2627
"dependencies": {
2728
"@actions/core": "^1.1.1"
2829
},

wait.js

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)