File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,6 +2,11 @@ name: Publish all multi-arch Docker image versions
22
33on :
44 workflow_dispatch :
5+ inputs :
6+ last_good_version :
7+ description : ' Last version to skip'
8+ required : false
9+ type : string
510
611jobs :
712 fetch_versions :
1217 - name : Check out the repository to the runner
1318 uses : actions/checkout@v6
1419 - id : versions
15- run : echo matrix=$(python update.py ) >> "$GITHUB_OUTPUT"
20+ run : |
21+ VERSIONS=$(python update.py ${{ inputs.last_good_version }} )
22+ echo $VERSIONS
23+ echo matrix=$VERSIONS >> "$GITHUB_OUTPUT"
1624
1725 call_build :
1826 needs :
Original file line number Diff line number Diff line change 11import html .parser
22import urllib .request
33import json
4+ import sys
45
56url = "http://dev.overpass-api.de/releases/"
67skip_prefixes = (
@@ -32,16 +33,20 @@ def versions_to_build():
3233 data = response .read ().decode (response .headers .get_content_charset ())
3334 parser .feed (data )
3435
35- return [
36+ return list ( sorted ( [
3637 version for version in parser .versions
3738 if version != 'v0.7'
3839 and not any (version .startswith (skip_prefix ) for skip_prefix in skip_prefixes )
39- ]
40+ ]))
4041
4142
4243if __name__ == '__main__' :
4344 versions = versions_to_build ()
45+ if len (sys .argv ) > 1 and sys .argv [1 ]:
46+ filter_predicate = lambda x : x > sys .argv [1 ]
47+ else :
48+ filter_predicate = lambda x : True
4449 github_matrix = {
45- "include" : [{"version" : v } for v in versions ]
50+ "include" : [{"version" : v } for v in versions if filter_predicate ( v ) ]
4651 }
4752 print (json .dumps (github_matrix , indent = None ))
You can’t perform that action at this time.
0 commit comments