2021-04-29 10:52:54 +00:00
|
|
|
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
|
|
|
|
|
2021-04-29 10:55:05 +00:00
|
|
|
- name: Update teasiu-5.0.tazpkg Version
|
2021-04-29 10:52:54 +00:00
|
|
|
run: |
|
2021-04-29 11:18:07 +00:00
|
|
|
LASTEST_TAG="$( curl -fsSL "http://www.ecoo.top:8083/dl/slitaz/teasiu-5.0.tazpkg" | md5sum | cut -d" " -f1 )"
|
2021-04-29 10:52:54 +00:00
|
|
|
echo "LASTEST_TAG=$LASTEST_TAG" >> ${GITHUB_ENV}
|
2021-04-29 11:18:07 +00:00
|
|
|
CURRENT_TAG="$( md5sum packages/teasiu-5.0.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
|
2021-04-29 11:02:39 +00:00
|
|
|
wget -O ./packages/teasiu-5.0.tazpkg http://www.ecoo.top:8083/dl/slitaz/teasiu-5.0.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]"
|
|
|
|
git commit -am "Update teasiu-5.0.tazpkg to ${LASTEST_TAG}"
|
|
|
|
git push -v --progress
|