Skip to content

Commit

Permalink
add in check for recent changes
Browse files Browse the repository at this point in the history
Signed-off-by: Steve Cassidy <steve.cassidy@mq.edu.au>
  • Loading branch information
stevecassidy committed Aug 22, 2024
1 parent 97ddb9a commit 3495c2c
Showing 1 changed file with 17 additions and 24 deletions.
41 changes: 17 additions & 24 deletions .github/workflows/nightly-android-testbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,30 +12,23 @@ on:
# - cron: '39 20 * * 1-5'

jobs:
# check_date:
# runs-on: ubuntu-latest
# name: Check latest commit
# outputs:
# should_run: ${{ steps.commitswithintime.outputs.has-new-commits-within-time }}
# steps:
# - uses: actions/checkout@v4
# with:
# fetch-depth: 0

# - name: Run CommitsWithinTime script
# uses: AlexStormwood/CommitsWithinTime@v1.1.12
# id: commitswithintime
# with:
# days: 1
# - name: Get the output from CommitsWithinTime
# run: |
# echo "The 'has-new-commits-within-time' value is ${{ steps.commitswithintime.outputs.has-new-commits-within-time }}"
# echo "The 'number-of-commits-within-time' value is ${{ steps.commitswithintime.outputs.number-of-commits-within-time }}"
# echo "The 'total-commits' value is ${{ steps.commitswithintime.outputs.total-commits }}"
node-deb-gh-build-play:
check_date:
runs-on: ubuntu-latest
# needs: check_date
# if: ${{ needs.check_date.outputs.should_run == 'true' }}
name: Check latest commit
outputs:
should_run: ${{ steps.commitswithintime.outputs.has-new-commits-within-time }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Check for changes
id: check
run: |
git diff --quiet @{yesterday}.. || echo "changed=true" >> $GITHUB_OUTPUT
node-deb-gh-build-play:
runs-on: ubuntu-latest
needs: check_date
if: ${{ needs.check_date.outputs.changed == 'true' }}
continue-on-error: false
env:
TURBO_TEAM: ${{ vars.TURBO_TEAM }}
Expand Down Expand Up @@ -85,7 +78,7 @@ jobs:
echo "version_string=v${{env.app_version}}-android-#${{env.sha_short}}" >> "$GITHUB_ENV"
# https://docs.github.com/en/free-pro-team@latest/actions/guides/building-and-testing-java-with-gradle
- name: Cache Gradle packages
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
Expand Down

0 comments on commit 3495c2c

Please sign in to comment.