Skip to content

Commit 78b606d

Browse files
committed
gh action to update the dxcc data
1 parent 57d7242 commit 78b606d

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Update DXCC Fallback Data
2+
on:
3+
schedule:
4+
- cron: "5 18 * */1 *"
5+
workflow_dispatch:
6+
7+
jobs:
8+
run_scripts:
9+
if: github.repository == 'wavelog/dxcc_data'
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v4
15+
with:
16+
repository: wavelog/dxcc_data
17+
ref: master
18+
19+
- name: Remove old file
20+
run: |
21+
rm cty.xml.gz
22+
23+
- name: Download new file
24+
run: |
25+
wget -O cty.xml.gz https://cdn.clublog.org/cty.php?api=608df94896cb9c5421ae748235492b43815610c9
26+
27+
- name: Commit changes
28+
run: |
29+
git config --global user.name "github-actions"
30+
git config --global user.email "[email protected]"
31+
if [[ -n $(git status --porcelain) ]]; then
32+
git add .
33+
git commit -m "GH Action - Update DXCC Fallback Data"
34+
git push
35+
else
36+
echo "No changes to commit."
37+
fi
38+
env:
39+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)