-
Notifications
You must be signed in to change notification settings - Fork 33
/
setup-deploy-keys
executable file
·102 lines (84 loc) · 3.11 KB
/
setup-deploy-keys
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
#!/bin/sh -x
# (Re-)generate all deploy keys on
# https://github.com/cockpit-project/cockpit/settings/environments
#
# Your personal access token needs `public_repo` for this to work:
# https://github.com/settings/tokens
#
# You might want this first:
# dnf install python3-pynacl
#
# Note: this script doesn't delete old secrets, so if you make adjustments,
# please do that manually.
set -eu
cd "$(realpath -m "$0"/..)"
DRY_RUN="-v"
if test -n "${1:-}"; then
if test "$1" = "--dry-run" -o "$1" = "-n"; then
DRY_RUN="-n"
else
echo "Unrecognised argument"
exit 1
fi
fi
deploy_to() {
./github-upload-secrets ${DRY_RUN} --deploy-to "$@"
}
# bots
deploy_to cockpit-project/bots \
--deploy-from \
cockpit-project/bots/self/DEPLOY_KEY
# cockpit
deploy_to cockpit-project/cockpit \
--deploy-from \
cockpit-project/cockpit/npm-update/SELF_DEPLOY_KEY \
cockpit-project/cockpit/self/DEPLOY_KEY
deploy_to cockpit-project/cockpit-weblate \
--deploy-from \
cockpit-project/cockpit/cockpit-weblate/DEPLOY_KEY
deploy_to cockpit-project/cockpit-project.github.io \
--deploy-from \
cockpit-project/cockpit/website/DEPLOY_KEY
# cockpit-machines
deploy_to cockpit-project/cockpit-machines \
--deploy-from \
cockpit-project/cockpit-machines/npm-update/SELF_DEPLOY_KEY \
cockpit-project/cockpit-machines/self/DEPLOY_KEY
deploy_to cockpit-project/cockpit-machines-weblate \
--deploy-from \
cockpit-project/cockpit-machines/cockpit-machines-weblate/DEPLOY_KEY
# cockpit-podman
deploy_to cockpit-project/cockpit-podman \
--deploy-from \
cockpit-project/cockpit-podman/npm-update/SELF_DEPLOY_KEY \
cockpit-project/cockpit-podman/self/DEPLOY_KEY
deploy_to cockpit-project/cockpit-podman-weblate \
--deploy-from \
cockpit-project/cockpit-podman/cockpit-podman-weblate/DEPLOY_KEY
# cockpit-composer
deploy_to osbuild/cockpit-composer-weblate \
--deploy-from \
osbuild/cockpit-composer/cockpit-composer-weblate/DEPLOY_KEY
# cockpit-files
deploy_to cockpit-project/cockpit-files \
--deploy-from \
cockpit-project/cockpit-files/npm-update/SELF_DEPLOY_KEY \
cockpit-project/cockpit-files/self/DEPLOY_KEY
deploy_to cockpit-project/cockpit-files-weblate \
--deploy-from \
cockpit-project/cockpit-files/cockpit-files-weblate/DEPLOY_KEY
# shared
deploy_to cockpit-project/node-cache \
--deploy-from \
cockpit-project/cockpit/npm-update/NODE_CACHE_DEPLOY_KEY \
cockpit-project/cockpit/node-cache/DEPLOY_KEY \
cockpit-project/cockpit-files/npm-update/NODE_CACHE_DEPLOY_KEY \
cockpit-project/cockpit-files/node-cache/DEPLOY_KEY \
cockpit-project/cockpit-machines/npm-update/NODE_CACHE_DEPLOY_KEY \
cockpit-project/cockpit-machines/node-cache/DEPLOY_KEY \
cockpit-project/cockpit-podman/npm-update/NODE_CACHE_DEPLOY_KEY \
cockpit-project/cockpit-podman/node-cache/DEPLOY_KEY
# flathub
deploy_to cockpit-project/org.cockpit_project.CockpitClient \
--deploy-from \
cockpit-project/cockpit/flathub/DEPLOY_KEY