slitaz5cn/.github/workflows/linux64-3.16.55.tazpkg.yml

39 lines
1.3 KiB
YAML
Raw Normal View History

2021-05-06 10:39:23 +00:00
name: Update linux64-3.16.55.tazpkg
2021-04-29 10:52:54 +00:00
on:
workflow_dispatch:
schedule:
2021-05-06 10:39:23 +00:00
- cron: '0 */23 * * *'
2021-04-29 10:52:54 +00:00
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Checkout codebase
uses: actions/checkout@v2
2021-05-06 10:43:15 +00:00
- name: Update linux64-3.16.55.tazpkg Version
2021-04-29 10:52:54 +00:00
run: |
2022-02-15 17:20:06 +00:00
LASTEST_TAG="$( curl -fsSL "https://slitaz.cn/dl/linux64-3.16.55.tazpkg" | md5sum | cut -d" " -f1 )"
2021-04-29 10:52:54 +00:00
echo "LASTEST_TAG=$LASTEST_TAG" >> ${GITHUB_ENV}
2021-05-06 10:39:23 +00:00
CURRENT_TAG="$( md5sum packages/linux64-3.16.55.tazpkg | cut -d" " -f1 )"
2021-04-29 10:52:54 +00:00
echo "CURRENT_TAG=$CURRENT_TAG" >> ${GITHUB_ENV}
if [ ${CURRENT_TAG} != ${LASTEST_TAG} ]
then
2022-02-15 17:20:06 +00:00
wget -O ./packages/linux64-3.16.55.tazpkg https://slitaz.cn/dl/linux64-3.16.55.tazpkg
2021-04-29 10:52:54 +00:00
fi
- name: Push
2021-04-29 11:18:07 +00:00
if: env.CURRENT_TAG != env.LASTEST_TAG && !cancelled()
2021-04-29 10:52:54 +00:00
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
2021-05-06 10:39:23 +00:00
git commit -am "Update linux64-3.16.55.tazpkg to ${LASTEST_TAG}"
2021-04-29 10:52:54 +00:00
git push -v --progress
2021-05-05 00:15:51 +00:00
- name: Delete workflow runs
uses: GitRML/delete-workflow-runs@main
with:
retain_days: 1
keep_minimum_runs: 3