fix: cd
This commit is contained in:
parent
47472f088f
commit
205493092b
|
@ -35,28 +35,27 @@ on:
|
||||||
jobs:
|
jobs:
|
||||||
check_commits:
|
check_commits:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
new_commits: ${{ steps.check_last_commit.outputs.new_commits }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- 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
|
- name: Check for new commits in the last 23 hours
|
||||||
id: check_commits
|
id: check_last_commit
|
||||||
run: |
|
run: |
|
||||||
# Get the current time and the time 23 hours ago in ISO 8601 format
|
if git log --since="23 hours ago" --oneline | grep -q .; then
|
||||||
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
|
|
||||||
echo "New commits found in the last 23 hours."
|
echo "New commits found in the last 23 hours."
|
||||||
echo "::set-output name=new_commits::true"
|
echo "new_commits=true" >> $GITHUB_OUTPUT
|
||||||
else
|
else
|
||||||
echo "No new commits found in the last 23 hours."
|
echo "No new commits in the last 23 hours."
|
||||||
echo "::set-output name=new_commits::false"
|
echo "new_commits=false" >> $GITHUB_OUTPUT
|
||||||
fi
|
fi
|
||||||
build:
|
build:
|
||||||
needs: check_commits
|
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
|
name: Build Signed APK
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
env:
|
env:
|
||||||
|
|
Loading…
Reference in New Issue