File tree 1 file changed +11
-12
lines changed
1 file changed +11
-12
lines changed Original file line number Diff line number Diff line change 35
35
jobs :
36
36
check_commits :
37
37
runs-on : ubuntu-latest
38
+ outputs :
39
+ new_commits : ${{ steps.check_last_commit.outputs.new_commits }}
38
40
steps :
39
41
- name : Checkout repository
40
- uses : actions/checkout@v2
42
+ uses : actions/checkout@v3
43
+ with :
44
+ fetch-depth : 0
41
45
42
46
- name : Check for new commits in the last 23 hours
43
- id : check_commits
47
+ id : check_last_commit
44
48
run : |
45
- # Get the current time and the time 23 hours ago in ISO 8601 format
46
- now=$(date --utc +%Y-%m-%dT%H:%M:%SZ)
47
- past=$(date --utc --date='23 hours ago' +%Y-%m-%dT%H:%M:%SZ)
48
-
49
- # Fetch commit history and check for commits in the last 23 hours
50
- if git rev-list --since="$past" --count HEAD > /dev/null; then
49
+ if git log --since="23 hours ago" --oneline | grep -q .; then
51
50
echo "New commits found in the last 23 hours."
52
- echo "::set-output name= new_commits:: true"
51
+ echo "new_commits= true" >> $GITHUB_OUTPUT
53
52
else
54
- echo "No new commits found in the last 23 hours."
55
- echo "::set-output name= new_commits:: false"
53
+ echo "No new commits in the last 23 hours."
54
+ echo "new_commits= false" >> $GITHUB_OUTPUT
56
55
fi
57
56
build :
58
57
needs : check_commits
59
- if : ${{ needs.check_commits.outputs.new_commits == 'true' && inputs.track != 'none' }}
58
+ if : needs.check_commits.outputs.new_commits == 'true'
60
59
name : Build Signed APK
61
60
runs-on : ubuntu-latest
62
61
env :
You can’t perform that action at this time.
0 commit comments