🐛 Treat credential and token as base64 encoded

This commit is contained in:
chaoqun committed 2024-07-01 20:50:15 +08:00
1 parent 50c593ae10
commit b7dff23eb8
4 files changed
+30 -6

No files matched your search

+12
View File
@@ -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:
+4 -4
View File
@@ -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 }}
+12
View File
@@ -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:
+2 -2
View File
@@ -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'