Skip to content

build

build #1454

Workflow file for this run

name: build
on:
workflow_dispatch:
schedule:
- cron: "2 * * * *"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: pnpm/action-setup@v4
with:
version: 9
- name: Checkout Data
uses: actions/checkout@v4
- name: Set up S3cmd cli tool
uses: s3-actions/[email protected]
with:
provider: cloudflare
region: 'auto'
access_key: ${{ secrets.S3_ACCESS_KEY }}
secret_key: ${{ secrets.S3_SECRET_KEY }}
account_id: ${{ secrets.S3_ACCOUNT_ID }}
- name: Set Timezone
uses: szenius/[email protected]
with:
timezoneLinux: "Asia/Shanghai"
- name: Parse
run: |
s3cmd get s3://openipdb/openipdb.ipdb /tmp/openipdb.ipdb
ls -al /tmp/openipdb.ipdb
rm -r ./data
pnpm install
pnpm run build
- name: Push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
if [ -z "$(git status --porcelain)" ]; then
echo "No changes to the output on this push; exiting."
exit 0
fi
git config --global user.name "github-actions[bot]"
git config --global user.email "[email protected]"
git add .
git commit -m "[auto] $(date '+%Y-%m-%d %H:%M:%S')"
git push