GitXplorerGitXplorer
t

base64-to-file

public
80 stars
25 forks
4 issues

Commits

List of commits on branch main.
Verified
604a8926a81a2da120d09b06bb76da9bba5aee6e

Merge pull request #57 from chenrui333/fix-workflow-to-match-with-default-branch

ttimheuer committed a year ago
Verified
2f0d58e350fead8321a6a994848a80f1a9419f27

fix: update branch trigger to match with default branch change

cchenrui333 committed a year ago
Verified
784a1a4a994315802b7d8e2084e116e783d157be

[skip ci] Merge pull request #56 from timheuer/all-contributors/add-chenrui333

ttimheuer committed a year ago
Unverified
adaa40c0c581f276132199d4cf60afa07ce60eac

Modified version

ttimheuer committed a year ago
Unverified
940b03f02a2b3c1fb1d89e66315975477d67e01e

Merge branch 'chenrui333-node-20'

ttimheuer committed a year ago
Verified
ce53155905f3e1b26757855e82f35d8ba14a429a

docs: update .all-contributorsrc [skip ci]

aallcontributors[bot] committed a year ago

README

The README file for this repository.

Base64 to File

All Contributors

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.

Usage

- name: Run Workflow
  id: write_file
  uses: timheuer/base64-to-file@v1.2
  with:
    fileName: 'myTemporaryFile.txt'
    fileDir: './main/folder/subfolder/'
    encodedString: ${{ secrets.SOME_ENCODED_STRING }}

By default this writes the fileName to a temporary path defined by env.RUNNER_TEMP. If you want a different path that is writable, specify fileDir as an input argument as well and then fileDir and fileName will be combined to create the path where the output will be written. This assumes permissions in the fileDir are correct and does not try to set them.

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.2
  with:
    fileName: 'myTemporaryFile.txt'
    encodedString: ${{ secrets.SOME_ENCODED_STRING }}

- name: Some other step
  uses: actions/someaction@master
  with:
      filelocation: ${{ steps.write_file.outputs.filePath }}

Using this in a reusable workflow

As a special note, when using reusable workflows, repository secrets do not naturally 'flow' through to the workflow. So if your encodedString value is a repository secret and you expect this to work when this action is used in a reusable workflow, you need to specify the secrets: inherit value in that situation and put that where you are reusing this workflow.

Building this repo

After making modifications to the source index.js file, to properly package the change you need to run

npm run package

which will modify/create the /dist folder with the final index.js output

Contributors ✨

Thanks goes to these wonderful people (emoji key):

MichaΕ‚ Filipek
MichaΕ‚ Filipek

πŸ“–
Tim Heuer
Tim Heuer

πŸ’» πŸ“–
tubone(Yu Otsubo)
tubone(Yu Otsubo)

πŸ’»
GG
GG

πŸ“–
Daniel Zarins
Daniel Zarins

πŸ›
Robbie Frodsham
Robbie Frodsham

πŸ›
Basti
Basti

πŸ› πŸ’»
Codemenschen Android
Codemenschen Android

πŸ›
Osmund Maheswaran
Osmund Maheswaran

πŸ›
Rui Chen
Rui Chen

πŸ’»

This project follows the all-contributors specification. Contributions of any kind welcome!