Skip to content

Commit 873a7f8

Browse files
authored
Don't hardcode the release id.
1 parent 1800831 commit 873a7f8

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

.github/workflows/geoip.yml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,22 @@ on:
66
workflow_dispatch:
77

88
jobs:
9+
release:
10+
runs-on: ubuntu-latest
11+
outputs:
12+
id: ${{ steps.latest_release_info.outputs.id }}
13+
upload_url: ${{ steps.latest_release_info.outputs.upload_url }}
14+
steps:
15+
- name: Gets latest created release info
16+
id: latest_release_info
17+
uses: jossef/[email protected]
18+
env:
19+
GITHUB_TOKEN: ${{ secrets.GEOIP_TOKEN }}
20+
921
download:
1022
name: Cache GeoIP database
11-
runs-on: ubuntu-20.04
12-
23+
runs-on: ubuntu-latest
24+
needs: release
1325
steps:
1426
- name: Clone repository
1527
uses: actions/checkout@v2
@@ -23,7 +35,7 @@ jobs:
2335
env:
2436
GITHUB_TOKEN: ${{ secrets.GEOIP_TOKEN }}
2537
with:
26-
release_id: 49852973
38+
release_id: ${{ needs.release.outputs.id }}
2739
asset_name: IP2LOCATION-LITE-DB1.IPV6.BIN.1.ZIP
2840

2941
- name: Upload release asset

0 commit comments

Comments
 (0)