Update packages-imm-23.05 #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update packages-imm-23.05 | |
on: | |
repository_dispatch: | |
release: | |
types: published | |
# push: | |
# branches: | |
# - main | |
# schedule: | |
# - cron: 0 18 */3 * * | |
watch: | |
types: started | |
workflow_dispatch: | |
env: | |
TZ: Asia/Shanghai | |
jobs: | |
merge: | |
runs-on: Ubuntu-22.04 | |
if: github.event.repository.owner.id == github.event.sender.id || ! github.event.sender.id | |
steps: | |
- name: Checkout | |
uses: actions/checkout@main | |
with: | |
fetch-depth: 0 | |
- name: Initialization environment | |
env: | |
DEBIAN_FRONTEND: noninteractive | |
run: | | |
sudo -E apt-get -qq update | |
sudo -E apt-get -qq install git subversion git-core wget | |
sudo timedatectl set-timezone "$TZ" | |
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
git config --global user.name "github-actions[bot]" | |
- name: Clone packages | |
run: | | |
cd $GITHUB_WORKSPACE | |
chmod +x packages-imm-23.05.sh | |
git clone -b imm-23.05 https://github.com/14link/diy-package.git packages | |
cd packages | |
rm -Rf * | |
git rm --cache * | |
$GITHUB_WORKSPACE/packages-imm-23.05.sh | |
- name: Upload | |
run: | | |
[ -e $GITHUB_WORKSPACE/README.md ] && cp $GITHUB_WORKSPACE/README.md $GITHUB_WORKSPACE/packages | |
cd $GITHUB_WORKSPACE/packages | |
git add . | |
git commit -m "update$(TZ='Asia/Shanghai' date +@%Y%m%d)" | |
git push --quiet "https://${{ secrets.TOKEN }}@github.com/14link/diy-package.git" | |
- name: Delete workflow runs | |
uses: Mattraks/delete-workflow-runs@main | |
continue-on-error: true | |
with: | |
retain_days: 2 | |
keep_minimum_runs: 0 | |