diff --git a/actions/general/README.md b/actions/general/README.md index e62eb72..9bb4e0f 100644 --- a/actions/general/README.md +++ b/actions/general/README.md @@ -16,10 +16,22 @@ See [actions/upload](../upload/README.md) for an example. **Required**, Please refer to [yutu prerequisites](https://github.com/eat-pray-ai/yutu?tab=readme-ov-file#prerequisites) to get a credential. +Note: The credential should be base64 encoded as input, for example: + +```shell +base64 -w 0 client_secret.json +``` + ### `token` **Required**, Please refer to [yutu prerequisites](https://github.com/eat-pray-ai/yutu?tab=readme-ov-file#prerequisites) to generate a token. +Note: The token should be base64 encoded as input, for example: + +```shell +base64 -w 0 youtube.token.json +``` + ### `command` **Optional**, The command to run, for all available commands: diff --git a/actions/general/action.yml b/actions/general/action.yml index 1786c9c..2b49119 100644 --- a/actions/general/action.yml +++ b/actions/general/action.yml @@ -7,10 +7,10 @@ inputs: required: false default: '' credential: - description: 'Credential to authenticate with the YouTube API' + description: 'Base64 encoded credential to authenticate with the YouTube API' required: true token: - description: 'Token to authenticate with the YouTube API' + description: 'Base64 encoded token to authenticate with the YouTube API' required: true command: description: 'Command to run, such as `video`, `channel` or `playlist`' @@ -37,6 +37,6 @@ runs: - shell: bash run: | chmod +x yutu-linux-amd64 - echo ${{ inputs.credential }} > ./client_secret.json - echo ${{ inputs.token }} > ./youtube.token.json + echo ${{ inputs.credential }} | base64 --decode > ./client_secret.json + echo ${{ inputs.token }} | base64 --decode > ./youtube.token.json ./yutu-linux-amd64 ${{ inputs.command }} ${{ inputs.subcommand }} ${{ inputs.flags }} diff --git a/actions/upload/README.md b/actions/upload/README.md index 2d2234f..f6c476c 100644 --- a/actions/upload/README.md +++ b/actions/upload/README.md @@ -33,10 +33,22 @@ jobs: **Required**, Please refer to [yutu prerequisites](https://github.com/eat-pray-ai/yutu?tab=readme-ov-file#prerequisites) to get a credential. +Note: The credential should be base64 encoded as input, for example: + +```shell +base64 -w 0 client_secret.json +``` + ### `token` **Required**, Please refer to [yutu prerequisites](https://github.com/eat-pray-ai/yutu?tab=readme-ov-file#prerequisites) to generate a token. +Note: The token should be base64 encoded as input, for example: + +```shell +base64 -w 0 youtube.token.json +``` + ### `flags` **Required**, Flags passed to yutu, for all available flags when uploading a video: diff --git a/actions/upload/action.yml b/actions/upload/action.yml index 064f9ef..2a80268 100644 --- a/actions/upload/action.yml +++ b/actions/upload/action.yml @@ -7,10 +7,10 @@ inputs: required: false default: '' credential: - description: 'Credential to authenticate with the YouTube API' + description: 'Base64 encoded credential to authenticate with the YouTube API' required: true token: - description: 'Token to authenticate with the YouTube API' + description: 'Base64 encoded token to authenticate with the YouTube API' required: true flags: description: 'Flags passed to the command/subcommand'