Skip to content
This repository has been archived by the owner on Jul 15, 2024. It is now read-only.

.github/workflows/main.yml #15373

.github/workflows/main.yml

.github/workflows/main.yml #15373

Workflow file for this run

on:
workflow_dispatch:
schedule:
- cron: "*/5 * * * *"
jobs:
update:
runs-on: ubuntu-latest
name: Update
permissions:
# Give the default GITHUB_TOKEN write permission to commit and push the
# added or changed files to the repository.
contents: write
steps:
- name: Cache Repository
uses: actions/cache@v4
with:
path: ${{ github.workspace }}
key: ${{ runner.os }}-workspace
- name: Checkout This
uses: actions/checkout@v4
with:
# Repository name with owner. For example, actions/checkout
# Default: ${{ github.repository }}
repository: ${{ github.repository }}
# Relative path under $GITHUB_WORKSPACE to place the repository
# Number of commits to fetch. 0 indicates all history for all branches and tags.
# Default: 1
fetch-depth: 0
# Relative path under $GITHUB_WORKSPACE to place the repository
path: '.'
- name: Update Data
uses: './'
- name: Setup Commit This
run: |
git config --local user.email "[email protected]"
git config --local user.name "UST Bot"
git add .
- name: Commit This
continue-on-error: true
run: |
now=$(TZ=Asia/Hong_Kong date --iso-8601=seconds)
git commit -a -m "update: $now"
- name: Push This
uses: ad-m/github-push-action@master
with:
directory: ${{ github.workspace }}