File contents Github Actions Workflow
GitHub Actions Workflow
# .github/workflows/generate-videos.yml
name: Generate Marketing Videos
on:
workflow_dispatch:
inputs:
prompt:
description: 'Video prompt'
required: true
default: 'Professional product showcase with modern lighting'
duration:
description: 'Video duration (5 or 10)'
required: true
default: '5'
type: choice
options:
- '5'
- '10'
model:
description: 'Model to use'
required: true
default: 'kling-v1.5'
type: choice
options:
- 'kling-v1'
- 'kling-v1.5'
- 'kling-pro'
schedule:
# Generate weekly content every Monday at 9am UTC
- cron: '0 9 * * 1'
jobs:
generate:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies
run: |
pip install requests boto3
- name: Generate video
id: generate
env:
KLINGAI_API_KEY: ${{ secrets.KLINGAI_API_KEY }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
run: |
python scripts/generate_video.py \
--prompt "${{ github.event.inputs.prompt || 'Weekly promotional video' }}" \
--duration ${{ github.event.inputs.duration || '5' }} \
--model "${{ github.event.inputs.model || 'kling-v1.5' }}" \
--output-json video_result.json
# Export result to job output
echo "video_url=$(jq -r '.video_url' video_result.json)" >> $GITHUB_OUTPUT
echo "job_id=$(jq -r '.job_id' video_result.json)" >> $GITHUB_OUTPUT
- name: Upload to S3
if: success()
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
run: |
python scripts/upload_to_s3.py \
--video-url "${{ steps.generate.outputs.video_url }}" \
--bucket "marketing-videos" \
--key "generated/${{ steps.generate.outputs.job_id }}.mp4"
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: video-result
path: video_result.json
retention-days: 30
- name: Notify Slack
if: always()
uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
fields: repo,message,commit,author
text: |
Video generation ${{ job.status }}
Job ID: ${{ steps.generate.outputs.job_id }}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
# Run tests on generated videos
validate:
needs: generate
runs-on: ubuntu-latest
steps:
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: video-result
- name: Validate video
run: |
VIDEO_URL=$(jq -r '.video_url' video_result.json)
# Check video is accessible
HTTP_STATUS=$(curl -s -o /dev/null -w "%{http_code}" "$VIDEO_URL")
if [ "$HTTP_STATUS" != "200" ]; then
echo "Video not accessible: $HTTP_STATUS"
exit 1
fi
echo "Video validation passed"
1 --- 2 name: 2302-github-actions-workflow-53d905d1 3 description: Github Actions Workflow 4 --- 5 # Github Actions Workflow 6 7 ## GitHub Actions Workflow 8 9 ```yaml 10 # .github/workflows/generate-videos.yml 11 name: Generate Marketing Videos 12 13 on: 14 workflow_dispatch: 15 inputs: 16 prompt: 17 description: 'Video prompt' 18 required: true 19 default: 'Professional product showcase with modern lighting' 20 duration: 21 description: 'Video duration (5 or 10)' 22 required: true 23 default: '5' 24 type: choice 25 options: 26 - '5' 27 - '10' 28 model: 29 description: 'Model to use' 30 required: true 31 default: 'kling-v1.5' 32 type: choice 33 options: 34 - 'kling-v1' 35 - 'kling-v1.5' 36 - 'kling-pro' 37 38 schedule: 39 # Generate weekly content every Monday at 9am UTC 40 - cron: '0 9 * * 1' 41 42 jobs: 43 generate: 44 runs-on: ubuntu-latest 45 46 steps: 47 - name: Checkout repository 48 uses: actions/checkout@v4 49 50 - name: Set up Python 51 uses: actions/setup-python@v5 52 with: 53 python-version: '3.11' 54 55 - name: Install dependencies 56 run: | 57 pip install requests boto3 58 59 - name: Generate video 60 id: generate 61 env: 62 KLINGAI_API_KEY: ${{ secrets.KLINGAI_API_KEY }} 63 AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} 64 AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} 65 run: | 66 python scripts/generate_video.py \ 67 --prompt "${{ github.event.inputs.prompt || 'Weekly promotional video' }}" \ 68 --duration ${{ github.event.inputs.duration || '5' }} \ 69 --model "${{ github.event.inputs.model || 'kling-v1.5' }}" \ 70 --output-json video_result.json 71 72 # Export result to job output 73 echo "video_url=$(jq -r '.video_url' video_result.json)" >> $GITHUB_OUTPUT 74 echo "job_id=$(jq -r '.job_id' video_result.json)" >> $GITHUB_OUTPUT 75 76 - name: Upload to S3 77 if: success() 78 env: 79 AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} 80 AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} 81 run: | 82 python scripts/upload_to_s3.py \ 83 --video-url "${{ steps.generate.outputs.video_url }}" \ 84 --bucket "marketing-videos" \ 85 --key "generated/${{ steps.generate.outputs.job_id }}.mp4" 86 87 - name: Upload artifact 88 uses: actions/upload-artifact@v4 89 with: 90 name: video-result 91 path: video_result.json 92 retention-days: 30 93 94 - name: Notify Slack 95 if: always() 96 uses: 8398a7/action-slack@v3 97 with: 98 status: ${{ job.status }} 99 fields: repo,message,commit,author 100 text: | 101 Video generation ${{ job.status }} 102 Job ID: ${{ steps.generate.outputs.job_id }} 103 env: 104 SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} 105 106 # Run tests on generated videos 107 validate: 108 needs: generate 109 runs-on: ubuntu-latest 110 111 steps: 112 - name: Download artifact 113 uses: actions/download-artifact@v4 114 with: 115 name: video-result 116 117 - name: Validate video 118 run: | 119 VIDEO_URL=$(jq -r '.video_url' video_result.json) 120 121 # Check video is accessible 122 HTTP_STATUS=$(curl -s -o /dev/null -w "%{http_code}" "$VIDEO_URL") 123 if [ "$HTTP_STATUS" != "200" ]; then 124 echo "Video not accessible: $HTTP_STATUS" 125 exit 1 126 fi 127 128 echo "Video validation passed" 129 ```
tools-only/X-Skills/tree/main/commercial/2302-github-actions-workflow_53d905d1 commit 63df25dcbd
Frequently asked questions How do I install the 2302 Github Actions Workflow 53d905d1 skill? Run npx skillmds@latest add tools-only/2302-github-actions-workflow-53d905d1 in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
What does the 2302 Github Actions Workflow 53d905d1 skill do? Github Actions Workflow It is listed under Productivity on SkillMD.
Is 2302 Github Actions Workflow 53d905d1 safe to use? This skill has not completed SkillMD's automated safety review yet. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
Which AI agents work with 2302 Github Actions Workflow 53d905d1? This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Is 2302 Github Actions Workflow 53d905d1 free to use? Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
Who published 2302 Github Actions Workflow 53d905d1? tools-only (@tools-only) published this skill. Their other Agent Skills are listed on their SkillMD profile.