-
Notifications
You must be signed in to change notification settings - Fork 9
executable file
·55 lines (51 loc) · 1.8 KB
/
update-tgg.yaml
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
52
53
54
# Name: update-tgg.yaml
# Author: Mathew Fleisch <mathew.fleisch@gmail.com>
# Description: This action will iterate through the rss feed of the TGG podcast
# and attempt to download metadata from google, memoryalpha and maximumfun
# and update the metadata saved in this repo data/episodes/*.json
name: Update The Greatest Generation Metadata
on:
# trigger Thursdays at 2:15pm PT (21:15UTC)
schedule:
- cron: '15 21 * * 4'
repository_dispatch:
types:
- update-shows
jobs:
build:
name: Update The Greatest Generation Metadata
runs-on: ubuntu-latest
steps:
-
uses: actions/checkout@v3
with:
token: ${{ secrets.GIT_TOKEN }}
fetch-depth: 0
-
name: Install semver with asdf
uses: asdf-vm/actions/install@v1
with:
tool_versions: |
semver 3.3.0
-
name: Update The Greatest Generation Metadata
run: |
pip install --upgrade pip
make setup
echo "${{ secrets.ENVFILE }}" | base64 -d > .env \
&& python ./utils/generate_show_json.py enterprise -p --next-episode \
&& rm -rf .env
rm -rf .env || true
git config user.name github-actions
git config user.email github-actions@github.com
git diff
git add data/episodes/*.json
if [[ $(git status --porcelain) ]]; then
# metadata was updated, bump/patch the semver in the helm chart and push to main
make helm-bump-patch
git add charts/agimus/Chart.yaml
git commit -m "Update The Greatest Generation Metadata - $(date)"
git push origin main
else
echo "There were no updates found for this show's metadata."
fi