Skip to content

Commit 2054930

Browse files
committed
fix: cd
1 parent 47472f0 commit 2054930

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

.github/workflows/release.yml

+11-12
Original file line numberDiff line numberDiff line change
@@ -35,28 +35,27 @@ on:
3535
jobs:
3636
check_commits:
3737
runs-on: ubuntu-latest
38+
outputs:
39+
new_commits: ${{ steps.check_last_commit.outputs.new_commits }}
3840
steps:
3941
- name: Checkout repository
40-
uses: actions/checkout@v2
42+
uses: actions/checkout@v3
43+
with:
44+
fetch-depth: 0
4145

4246
- name: Check for new commits in the last 23 hours
43-
id: check_commits
47+
id: check_last_commit
4448
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
5150
echo "New commits found in the last 23 hours."
52-
echo "::set-output name=new_commits::true"
51+
echo "new_commits=true" >> $GITHUB_OUTPUT
5352
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
5655
fi
5756
build:
5857
needs: check_commits
59-
if: ${{ needs.check_commits.outputs.new_commits == 'true' && inputs.track != 'none' }}
58+
if: needs.check_commits.outputs.new_commits == 'true'
6059
name: Build Signed APK
6160
runs-on: ubuntu-latest
6261
env:

0 commit comments

Comments
 (0)