Skip to content

Commit 8532a6e

Browse files
committed
Create publish all workflow
1 parent 6d8a5a3 commit 8532a6e

3 files changed

Lines changed: 33 additions & 2 deletions

File tree

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
on:
2+
workflow_dispatch:
3+
4+
jobs:
5+
fetch_versions:
6+
runs-on: ubuntu-latest
7+
outputs:
8+
matrix: ${{ steps.versions.outputs.matrix }}
9+
steps:
10+
- id: versions
11+
run: echo matrix=$(python ./Overpass-API/update.py )
12+
13+
call_build:
14+
needs:
15+
- fetch_versions
16+
strategy:
17+
max-parallel: 1
18+
matrix: ${{ fromJson(needs.fetch_versions.outputs.matrix) }}
19+
uses: ./.github/workflows/docker-publish.yml
20+
with:
21+
overpass_version: ${{ matrix.version}}

.github/workflows/docker-publish.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ on:
99
description: 'Version number to build (e.g. 0.7.62)'
1010
required: true
1111
type: string
12+
workflow_call:
13+
inputs:
14+
overpass_version:
15+
description: 'Version number to build (e.g. 0.7.62)'
16+
required: true
17+
type: string
1218

1319
permissions:
1420
contents: read

update.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import html.parser
22
import urllib.request
3+
import json
34

45
url = "http://dev.overpass-api.de/releases/"
56
skip_prefixes = (
@@ -39,5 +40,8 @@ def versions_to_build():
3940

4041

4142
if __name__ == '__main__':
42-
for version_to_build in versions_to_build():
43-
print(version_to_build)
43+
versions = versions_to_build()
44+
github_matrix = {
45+
"include": [{"version": v} for v in versions]
46+
}
47+
print(json.dumps(github_matrix, indent=None))

0 commit comments

Comments
 (0)