-
Notifications
You must be signed in to change notification settings - Fork 58
146 lines (130 loc) · 5.14 KB
/
Copy pathopensky-version.yml
File metadata and controls
146 lines (130 loc) · 5.14 KB
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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
name: Mirror OpenSky package file
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * *'
permissions:
contents: read
jobs:
update-check:
runs-on: ubuntu-latest
timeout-minutes: 360
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout repository
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
ref: 'master'
- name: Download arm64 Package File
uses: nick-fields/retry@ad984534de44a9489a53aefd81eb77f87c70dc60 # v4.0.0
with:
timeout_seconds: 60
max_attempts: 200
retry_wait_seconds: 180
shell: bash
command: |
aria2c \
--connect-timeout=30 \
--timeout=30 \
--lowest-speed-limit=10K \
--max-tries=1 \
--allow-overwrite=true \
-o opensky-network/.Packages.arm64 \
https://s3.opensky-network.org/website-public-repos/debian/dists/opensky/custom/binary-arm64/Packages
- name: Download amd64 Package File
uses: nick-fields/retry@ad984534de44a9489a53aefd81eb77f87c70dc60 # v4.0.0
with:
timeout_seconds: 60
max_attempts: 200
retry_wait_seconds: 180
shell: bash
command: |
aria2c \
--connect-timeout=30 \
--timeout=30 \
--lowest-speed-limit=10K \
--max-tries=1 \
--allow-overwrite=true \
-o opensky-network/.Packages.amd64 \
https://s3.opensky-network.org/website-public-repos/debian/dists/opensky/custom/binary-amd64/Packages
- name: Download armhf Package File
uses: nick-fields/retry@ad984534de44a9489a53aefd81eb77f87c70dc60 # v4.0.0
with:
timeout_seconds: 60
max_attempts: 200
retry_wait_seconds: 180
shell: bash
command: |
aria2c \
--connect-timeout=30 \
--timeout=30 \
--lowest-speed-limit=10K \
--max-tries=1 \
--allow-overwrite=true \
-o opensky-network/.Packages.armhf \
https://s3.opensky-network.org/website-public-repos/debian/dists/opensky/custom/binary-armhf/Packages
- name: Sync OPENSKY_VERSION in Dockerfile
shell: bash
run: |
versions=()
for arch in arm64 amd64 armhf; do
v=$(awk '
/^Package: opensky-feeder$/ { p=1; next }
/^Package: / { p=0 }
p && /^Version: / { print $2; exit }
' "opensky-network/.Packages.${arch}")
if [ -z "$v" ]; then
echo "Could not parse opensky-feeder version from .Packages.${arch}" >&2
exit 1
fi
versions+=("$v")
done
unique=$(printf '%s\n' "${versions[@]}" | sort -u)
if [ "$(echo "$unique" | wc -l)" -ne 1 ]; then
echo "opensky-feeder version disagrees across architectures: ${versions[*]}" >&2
exit 1
fi
new_version="${versions[0]}"
sed -i "s|^ARG OPENSKY_VERSION=.*|ARG OPENSKY_VERSION=${new_version}|" \
opensky-network/Dockerfile.template
- name: Create pull request
uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1
with:
commit-message: Update OpenSky package files and version
committer: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
base: master
branch: bot/update-opensky-package-file
delete-branch: true
title: Update OpenSky package files and version
body: Update OpenSky `Packages` indices for all supported architectures and bump `OPENSKY_VERSION` in `opensky-network/Dockerfile.template` so version and SHA256 land atomically.
add-paths: |
opensky-network/.Packages.arm64
opensky-network/.Packages.amd64
opensky-network/.Packages.armhf
opensky-network/Dockerfile.template
keepalive-update:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
ref: 'master'
- name: Update check time
run: echo $(date -u) > '.github/update-check-time.txt'
shell: bash
- name: Push latest check time
uses: stefanzweifel/git-auto-commit-action@04702edda442b2e678b25b537cec683a1493fcb9 # v7.1.0
with:
commit_message: Update latest version check time
branch: bot/keepalive-update-check
create_branch: true
push_options: '--force'
commit_user_name: github-actions[bot]
commit_user_email: 41898282+github-actions[bot]@users.noreply.github.com
commit_author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
file_pattern: '.github/update-check-time.txt'