-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (43 loc) · 1.18 KB
/
run-script.yml
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
51
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.11'
- 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-pittsburgh-pa-940bf40c
service_account_key: ${{ secrets.GOOGLE_CREDENTIALS }}
export_default_credentials: true
- name: Dump Credentials to JSON
uses: jsdaniell/create-json@v1.2.2
with:
name: "google-creds.json"
json: ${{ secrets.GOOGLE_CREDENTIALS }}
dir: "python/"
- name: Run Command
if: ${{ github.event_name == 'workflow_dispatch' }}
run: |
cd python/
${{ github.event.inputs.command-and-args }}