Skip to content

Commit

Permalink
fix: cd
Browse files Browse the repository at this point in the history
  • Loading branch information
zaneschepke committed Oct 22, 2024
1 parent 47472f0 commit 2054930
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,28 +35,27 @@ on:
jobs:
check_commits:
runs-on: ubuntu-latest
outputs:
new_commits: ${{ steps.check_last_commit.outputs.new_commits }}
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Check for new commits in the last 23 hours
id: check_commits
id: check_last_commit
run: |
# Get the current time and the time 23 hours ago in ISO 8601 format
now=$(date --utc +%Y-%m-%dT%H:%M:%SZ)
past=$(date --utc --date='23 hours ago' +%Y-%m-%dT%H:%M:%SZ)
# Fetch commit history and check for commits in the last 23 hours
if git rev-list --since="$past" --count HEAD > /dev/null; then
if git log --since="23 hours ago" --oneline | grep -q .; then
echo "New commits found in the last 23 hours."
echo "::set-output name=new_commits::true"
echo "new_commits=true" >> $GITHUB_OUTPUT
else
echo "No new commits found in the last 23 hours."
echo "::set-output name=new_commits::false"
echo "No new commits in the last 23 hours."
echo "new_commits=false" >> $GITHUB_OUTPUT
fi
build:
needs: check_commits
if: ${{ needs.check_commits.outputs.new_commits == 'true' && inputs.track != 'none' }}
if: needs.check_commits.outputs.new_commits == 'true'
name: Build Signed APK
runs-on: ubuntu-latest
env:
Expand Down

0 comments on commit 2054930

Please sign in to comment.