-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (42 loc) · 1.15 KB
/
run-script.yml
File metadata and controls
50 lines (42 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: Run Command
on:
push:
branches:
- main
workflow_dispatch:
inputs:
command-and-args:
description: "A command and all arguments to passthrough to the runner."
required: true
jobs:
run-command:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
with:
python-version: '3.10'
- name: Install Packages
run: |
sudo apt update
sudo apt-get install ffmpeg --fix-missing
- name: Install Python Dependencies
run: |
cd python/
pip install .
- name: Setup gcloud
uses: google-github-actions/setup-gcloud@v0
with:
project_id: cdp-cdpdev-ntrbwppe
service_account_key: ${{ secrets.GOOGLE_CREDENTIALS }}
export_default_credentials: true
- name: Dump Credentials to JSON
run: |
echo "$GOOGLE_CREDS" > python/google-creds.json
env:
GOOGLE_CREDS: ${{ secrets.GOOGLE_CREDENTIALS }}
- name: Run Command
if: ${{ github.event_name == 'workflow_dispatch' }}
run: |
cd python/
${{ github.event.inputs.command-and-args }}