give value
Browse files- .github/workflows/publisher.yml +0 -4
- publisher.env +0 -1
- social_media_publishers/app.py +6 -1
.github/workflows/publisher.yml
CHANGED
|
@@ -35,9 +35,6 @@ on:
|
|
| 35 |
GCS_BUCKET_FOLDER_NAME:
|
| 36 |
description: 'GCS Bucket Folder Name'
|
| 37 |
required: false
|
| 38 |
-
GSHEET_ID:
|
| 39 |
-
description: 'Google Sheet ID'
|
| 40 |
-
required: false
|
| 41 |
|
| 42 |
# Core
|
| 43 |
|
|
@@ -153,7 +150,6 @@ jobs:
|
|
| 153 |
# Core
|
| 154 |
GCS_BUCKET_NAME: ${{ github.event.inputs.GCS_BUCKET_NAME || vars.GCS_BUCKET_NAME }}
|
| 155 |
GCS_BUCKET_FOLDER_NAME: ${{ github.event.inputs.GCS_BUCKET_FOLDER_NAME || vars.GCS_BUCKET_FOLDER_NAME }}
|
| 156 |
-
GSHEET_ID: ${{ github.event.inputs.GSHEET_ID || vars.GSHEET_ID }}
|
| 157 |
|
| 158 |
# Token Manager
|
| 159 |
ENCRYPTION_KEY: ${{ github.event.inputs.ENCRYPTION_KEY || secrets.ENCRYPTION_KEY }}
|
|
|
|
| 35 |
GCS_BUCKET_FOLDER_NAME:
|
| 36 |
description: 'GCS Bucket Folder Name'
|
| 37 |
required: false
|
|
|
|
|
|
|
|
|
|
| 38 |
|
| 39 |
# Core
|
| 40 |
|
|
|
|
| 150 |
# Core
|
| 151 |
GCS_BUCKET_NAME: ${{ github.event.inputs.GCS_BUCKET_NAME || vars.GCS_BUCKET_NAME }}
|
| 152 |
GCS_BUCKET_FOLDER_NAME: ${{ github.event.inputs.GCS_BUCKET_FOLDER_NAME || vars.GCS_BUCKET_FOLDER_NAME }}
|
|
|
|
| 153 |
|
| 154 |
# Token Manager
|
| 155 |
ENCRYPTION_KEY: ${{ github.event.inputs.ENCRYPTION_KEY || secrets.ENCRYPTION_KEY }}
|
publisher.env
CHANGED
|
@@ -2,6 +2,5 @@ SOCIAL_MEDIA_PUBLISHER_UPLOAD_LIMIT_PER_ACCOUNT=
|
|
| 2 |
SOCIAL_MEDIA_PUBLISH_PLATFORMS=
|
| 3 |
GCS_BUCKET_NAME=
|
| 4 |
GCS_BUCKET_FOLDER_NAME=
|
| 5 |
-
GSHEET_ID=
|
| 6 |
VIDEO_PUBLISH_PUBLIC=
|
| 7 |
SOCIAL_MEDIA_PUBLISHER_PROVIDER=
|
|
|
|
| 2 |
SOCIAL_MEDIA_PUBLISH_PLATFORMS=
|
| 3 |
GCS_BUCKET_NAME=
|
| 4 |
GCS_BUCKET_FOLDER_NAME=
|
|
|
|
| 5 |
VIDEO_PUBLISH_PUBLIC=
|
| 6 |
SOCIAL_MEDIA_PUBLISHER_PROVIDER=
|
social_media_publishers/app.py
CHANGED
|
@@ -632,12 +632,17 @@ def trigger_github_workflow_job():
|
|
| 632 |
|
| 633 |
# Construct Command
|
| 634 |
# Using hybrid provider by default for scheduled runs as per request
|
|
|
|
| 635 |
cmd = [
|
| 636 |
"gh", "workflow", "run", "publisher.yml",
|
|
|
|
| 637 |
"-f", "SOCIAL_MEDIA_PUBLISHER_PROVIDER=hybrid",
|
| 638 |
"-f", f"SOCIAL_MEDIA_PUBLISHER_UPLOAD_LIMIT_PER_ACCOUNT={upload_limit}",
|
| 639 |
-
"-f", f"VIDEO_PUBLISH_PUBLIC={is_public}"
|
|
|
|
|
|
|
| 640 |
]
|
|
|
|
| 641 |
|
| 642 |
# Execute
|
| 643 |
result = subprocess.run(cmd, capture_output=True, text=True)
|
|
|
|
| 632 |
|
| 633 |
# Construct Command
|
| 634 |
# Using hybrid provider by default for scheduled runs as per request
|
| 635 |
+
repo = get_config_value("GITHUB_REPO", "ElvoroLtd/Elvoro")
|
| 636 |
cmd = [
|
| 637 |
"gh", "workflow", "run", "publisher.yml",
|
| 638 |
+
"--repo", repo,
|
| 639 |
"-f", "SOCIAL_MEDIA_PUBLISHER_PROVIDER=hybrid",
|
| 640 |
"-f", f"SOCIAL_MEDIA_PUBLISHER_UPLOAD_LIMIT_PER_ACCOUNT={upload_limit}",
|
| 641 |
+
"-f", f"VIDEO_PUBLISH_PUBLIC={is_public}",
|
| 642 |
+
"-f", f"GCS_BUCKET_NAME={get_config_value('GCS_BUCKET_NAME', '')}",
|
| 643 |
+
"-f", f"GCS_BUCKET_FOLDER_NAME={get_config_value('GCS_BUCKET_FOLDER_NAME', '')}",
|
| 644 |
]
|
| 645 |
+
print(cmd)
|
| 646 |
|
| 647 |
# Execute
|
| 648 |
result = subprocess.run(cmd, capture_output=True, text=True)
|