Skip to content

Commit c71efd3

Browse files
authored
Update update-checker.yml
1 parent 58285f4 commit c71efd3

File tree

1 file changed

+18
-17
lines changed

1 file changed

+18
-17
lines changed

.github/workflows/update-checker.yml

+18-17
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,25 @@
11
#
2-
# Copyright (c) 2019-2021 P3TERX <https://p3terx.com>
3-
#
4-
# This is free software, licensed under the MIT License.
5-
# See /LICENSE for more information.
6-
#
72
# https://github.com/P3TERX/Actions-OpenWrt
3+
#
84
# File: .github/workflows/update-checker.yml
95
# Description: Source code update checker
106
#
7+
# Copyright (c) 2019-2024 P3TERX <https://p3terx.com>
8+
#
9+
# This is free software, licensed under the MIT License.
10+
# See /LICENSE for more information.
11+
#
1112

12-
name: Update Checker
13+
name: Update-Checker
1314

1415
env:
15-
REPO_URL: https://github.com/coolsnowwolf/lede
16-
REPO_BRANCH: master
16+
REPO_URL: https://github.com/immortalwrt/immortalwrt
17+
REPO_BRANCH: openwrt-23.05
1718

1819
on:
1920
workflow_dispatch:
2021
schedule:
21-
- cron: 0 */18 * * *
22+
- cron: 0 0 1/7 * *
2223

2324
jobs:
2425
check:
@@ -30,14 +31,14 @@ jobs:
3031
id: getHash
3132
run: |
3233
git clone --depth 1 $REPO_URL -b $REPO_BRANCH .
33-
echo "::set-output name=commitHash::$(git rev-parse HEAD)"
34+
echo "commitHash=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
3435
3536
- name: Compare Commit Hash
3637
id: cacheHash
37-
uses: actions/cache@v2
38+
uses: actions/cache@v4
3839
with:
3940
path: .commitHash
40-
key: HEAD-${{ steps.getHash.outputs.commitHash }}
41+
key: commitHash_${{ steps.getHash.outputs.commitHash }}
4142

4243
- name: Save New Commit Hash
4344
if: steps.cacheHash.outputs.cache-hit != 'true'
@@ -46,13 +47,13 @@ jobs:
4647
4748
- name: Trigger build
4849
if: steps.cacheHash.outputs.cache-hit != 'true'
49-
uses: peter-evans/repository-dispatch@v1
50+
uses: peter-evans/repository-dispatch@v2
5051
with:
51-
token: ${{ secrets.ACTIONS_TRIGGER_PAT }}
52+
token: ${{ secrets.TOKEN }}
5253
event-type: Source Code Update
5354

5455
- name: Delete workflow runs
55-
uses: GitRML/delete-workflow-runs@main
56+
uses: Mattraks/delete-workflow-runs@v2
5657
with:
57-
retain_days: 1
58-
keep_minimum_runs: 1
58+
retain_days: 0
59+
keep_minimum_runs: 2

0 commit comments

Comments
 (0)