Merge pull request #2 from timheuer/v1

V1
This commit is contained in:
Tim Heuer authored and GitHub committed 2019-12-14 16:05:09 -08:00
commit 13902e12a7
3 files changed
+21 -4

No files matched your search

+19 -2
View File
@@ -1,4 +1,4 @@
# Base63 to File
# Base64 to File
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.
@@ -7,8 +7,25 @@ Use this action if you need to get a file from a base64-encoded string that you
```
- name: Run Workflow
id: write_file
uses: ./
uses: timheuer/base64-to-file@v1
with:
fileName: 'myTemporaryFile.txt'
encodedString: ${{ secrets.SOME_ENCODED_STRING }}
```
## Using the file in a later step
The Action has an output variable named filePath that you can use as this file is written to TEMP. Make sure you ad an `id` to your step when using this Action so that you can easily pull it out of the steps context later.
```
- name: Run Workflow
id: write_file
uses: timheuer/base64-to-file@v1
with:
fileName: 'myTemporaryFile.txt'
encodedString: ${{ secrets.SOME_ENCODED_STRING }}
- name: Some other step
uses: actions/someaction@master
with:
filelocation: ${{ steps.write_file.outputs.filePath }}
```
+1 -1
View File
@@ -57,7 +57,7 @@ const core = __webpack_require__(470);
const fs = __webpack_require__(747);
// get input parameter values from config
var fileName = core.getInput('fileName');
var fileName = process.env['TEMP'] + '\\' + core.getInput('fileName');
var encodedString = core.getInput('encodedString');
// most @actions toolkit packages have async methods
+1 -1
View File
@@ -2,7 +2,7 @@ const core = require('@actions/core');
const fs = require('fs');
// get input parameter values from config
var fileName = core.getInput('fileName');
var fileName = process.env['TEMP'] + '\\' + core.getInput('fileName');
var encodedString = core.getInput('encodedString');
// most @actions toolkit packages have async methods