-
Notifications
You must be signed in to change notification settings - Fork 22
59 lines (49 loc) · 1.47 KB
/
refresh_stores.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
52
53
54
55
56
57
58
59
name: Refresh Trust Stores
on:
schedule:
# Run this workflow once a week
- cron: '0 0 * * 0'
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.12"]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install pip
run: |
python -m pip install --upgrade pip setuptools
- name: Install dependencies
run: python -m pip install -r requirements.txt
- name: Setup SSH key
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
run: |
echo "$SSH_PRIVATE_KEY" > ssh.key
chmod 600 ssh.key
- name: Activate SSH key
run: |
eval "$(ssh-agent -s)"
ssh-add ssh.key
- name: Refresh the trust stores
run: |
python main.py --refresh
# Export the trust stores as PEM to ./export
python main.py --export
# Export the trust stores as YAML to ./export
cp ./trust_stores/* ./export
- name: Push changes to Git
run: |
cd ./export
tar -zcf trust_stores_as_pem.tar.gz *
mv trust_stores_as_pem.tar.gz ../docs
cd ..
git config user.email "trust_stores_observatory deploy key"
git config user.name "trust_stores_observatory deploy key"
git commit -am 'Automated update of the trust stores'
git push