Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/akiojin/decode-base64-github-action
https://github.com/akiojin/decode-base64-github-action
Last synced: 20 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/akiojin/decode-base64-github-action
- Owner: akiojin
- License: mit
- Created: 2023-03-10T00:26:21.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-10-01T02:52:29.000Z (about 2 months ago)
- Last Synced: 2024-10-12T05:04:50.537Z (about 1 month ago)
- Language: Shell
- Size: 741 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# decode-base64-github-action
This action sets a Base64 string to an environment variable or writes it to a file.
## Usage
### Simple usage
```yml
- uses: akiojin/[email protected]
id: decode-base64
with:
base64:
- run: |
echo ${{ steps.decode-base64.outputs.decoded }}
```### Example of default output path
```yml
- uses: akiojin/[email protected]
id: decode-base64
with:
base64:
- run: |
echo "Path=${{ steps.decode-base64.outputs.output-path }}"
cat ${{ steps.decode-base64.outputs.output-path }}
```### Example of specifying a file path for output
```yml
- uses: akiojin/[email protected]
id: decode-base64
with:
base64:
output-path: ${{ runner.temp }}/tmp.txt
- run: |
echo "Path=${{ steps.decode-base64.outputs.output-path }}"
cat ${{ steps.decode-base64.outputs.output-path }}
```### Example of setting an environment variable
```yml
- uses: akiojin/[email protected]
with:
base64:
environment: DECODED
- run: |
echo $DECODED
```## Parameters
### inputs
|Name|Required|Type|Default|Description|
|:--|:--|:--|:--|:--|
|`base64`|`true`|`string`||Specifies a Base64 string to decode.|
|`environment`|`false`|`string`|`''`|To also set the decoded string to an environment variable, specify the name of the environment variable in this parameter.If this value is set, the environment variable will be set to the decoded result.If omitted, the environment variable will not be set.|
|`output-path`|`false`|`string`|`''`|To output the decoded string to the specified file, specify a path in this parameter.If omitted, the internally set path is used and passed to `outputs.output-path`.|### outputs
|Name|Type|Description|
|:--|:--|:--|
|`decoded`|`string`|The decoded string is set.|
|`output-path`|`string`|The file path where the decoded string was written out.|## License
Any contributions made under this project will be governed by the [MIT License](https://github.com/akiojin/decode-base64-github-action/blob/main/LICENSE).