From 308aa6b96aea57199c7c522d4ac1c3cdb1fd1c7a Mon Sep 17 00:00:00 2001 From: Tim Heuer Date: Tue, 28 Apr 2026 14:20:54 -0700 Subject: [PATCH] docs: update readme snippet [skip ci] --- README.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index bcb2fe9..859cb62 100644 --- a/README.md +++ b/README.md @@ -10,20 +10,23 @@ Use this action if you need to get a file from a base64-encoded string that you ``` - name: Run Workflow id: write_file - uses: timheuer/base64-to-file@v1.2 + uses: timheuer/base64-to-file@v2 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 + uses: timheuer/base64-to-file@v2 with: fileName: 'myTemporaryFile.txt' encodedString: ${{ secrets.SOME_ENCODED_STRING }} @@ -35,9 +38,11 @@ The Action has an output variable named filePath that you can use as this file i ``` ### 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 ```