forked from g0v-network/link.g0v.network
-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (34 loc) · 1.08 KB
/
update-shortlinks.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
name: Update Shortlinks
on:
push:
branches: [main]
paths:
- .github/workflows/*shortlinks*.yml
- shortlinks.csv
repository_dispatch:
types: [force-update-shortlinks]
workflow_dispatch:
jobs:
runner:
runs-on: ubuntu-latest
env:
REPO_SLUG: g0v-network/link.g0v.network
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
id: setup-python
with:
python-version: '3.6'
- uses: actions/cache@v2
with:
path: ~/.local/share/virtualenvs
key: ${{ runner.os }}-python-${{ steps.setup-python.outputs.python-version }}-pipenv-${{ hashFiles('Pipfile.lock') }}
- run: pip install pipenv
- run: pipenv sync --dev
- env:
REBRANDLY_API_KEY: ${{ secrets.REBRANDLY_API_KEY }}
run: |
pipenv run spreadsheet2shortlinks --yes --verbose \
--spreadsheet "https://raw.githubusercontent.com/${REPO_SLUG}/${GITHUB_SHA}/shortlinks.csv" \
--domain-name "link.g0v.network" \
--rebrandly-api-key "$REBRANDLY_API_KEY"