Skip to content

Commit

Permalink
Merge pull request #35 from futuredapp/housekeep/add-detect-changes-t…
Browse files Browse the repository at this point in the history
…o-legacy

Add detect changes to legacy
  • Loading branch information
jmarek41 authored Oct 29, 2024
2 parents 4e8bb07 + eec7f88 commit fd2881b
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/ios-selfhosted-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,30 @@ on:
description: Token for submitting builds to App Center.

jobs:
detect_changes:
runs-on: ubuntu-latest
name: Detect changes
outputs:
should_run: ${{ steps.should_run.outputs.should_run }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Print latest_commit
run: echo ${{ github.sha }}
- id: should_run
continue-on-error: true
if: ${{ github.event_name == 'schedule' }}
name: Check latest commit is less than a day
run: |
sha=$(git rev-list --after="24 hours" ${{ github.sha }})
if test -z "$sha"; then
echo "should_run=false" >> "$GITHUB_OUTPUT"
fi
build:
runs-on: self-hosted
timeout-minutes: 30
needs: detect_changes
if: ${{ needs.detect_changes.outputs.should_run != 'false' }}

steps:
- name: Checkout
Expand Down

0 comments on commit fd2881b

Please sign in to comment.