slitaz5cn/.github/workflows/teasiu-5.0.tazpkg.yml

39 lines
1.2 KiB
YAML

name: Update teasiu-5.0.tazpkg
on:
workflow_dispatch:
schedule:
- cron: '0 */24 * * *'
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Checkout codebase
uses: actions/checkout@v2
- name: Update teasiu-5.0.tazpkg Version
run: |
LASTEST_TAG="$( curl -fsSL "https://slitaz.cn/dl/teasiu-5.0.tazpkg" | md5sum | cut -d" " -f1 )"
echo "LASTEST_TAG=$LASTEST_TAG" >> ${GITHUB_ENV}
CURRENT_TAG="$( md5sum packages/teasiu-5.0.tazpkg | cut -d" " -f1 )"
echo "CURRENT_TAG=$CURRENT_TAG" >> ${GITHUB_ENV}
if [ ${CURRENT_TAG} != ${LASTEST_TAG} ]
then
wget -O ./packages/teasiu-5.0.tazpkg https://slitaz.cn/dl/teasiu-5.0.tazpkg
fi
- name: Push
if: env.CURRENT_TAG != env.LASTEST_TAG && !cancelled()
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git commit -am "Update teasiu-5.0.tazpkg to ${LASTEST_TAG}"
git push -v --progress
- name: Delete workflow runs
uses: GitRML/delete-workflow-runs@main
with:
retain_days: 1
keep_minimum_runs: 3