Auto Update #9
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Simple workflow for deploying static content to GitHub Pages | |
name: Auto Update | |
on: | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
schedule: | |
- cron: "33 3 * * 5" | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
release: | |
environment: Action Env | |
permissions: | |
contents: write | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.11" | |
- name: Install | |
run: | | |
pip3 install -r requirements.txt | |
- name: Set current date as env variable | |
run: echo "TODAY=$(date +'%Y-%m-%d')" >> $GITHUB_ENV | |
- name: Build | |
run: python main.py release --locationiq-api-key "${{ secrets.LOCATIONIQ_API_KEY }}" --country-code "TW" "JP" "KR" | |
- name: Create Release | |
uses: ncipollo/release-action@v1 | |
with: | |
name: Auto Release ${{ env.TODAY }} | |
artifacts: "output/release.*" | |
body: 這是定期自動生成的 Release,如果發現問題請提 issue 並暫時選擇到 [此處](https://github.com/RxChi1d/immich-geodata-zh-tw/releases) 選擇手動發布的 Release 文件。如果遇到 Immich 沒有更新數據,請手動修改 geodata-date.txt 文件,將其內容中的時間修改為更新的時間(比如當前時間)。 | |
draft: false | |
generateReleaseNotes: false | |
commit: main | |
tag: auto-release | |
allowUpdates: true | |
makeLatest: true | |
- uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
commit_message: Auto update reverse geocoding data on ${{ env.TODAY }} | |
file_pattern: meta_data/* |