Skip to content

Commit

Permalink
Merge pull request #34 from futuredapp/housekeep/detect-changes
Browse files Browse the repository at this point in the history
housekeep/Detect changes
  • Loading branch information
jmarek41 authored Oct 24, 2024
2 parents 530923e + 596166f commit 8dd1218
Showing 1 changed file with 16 additions and 12 deletions.
28 changes: 16 additions & 12 deletions .github/workflows/ios-selfhosted-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,26 +31,30 @@ on:
Private App Store Connect API issuer key for submitting build to App Store.
jobs:
detect-changes:
name: Detect Changes
detect_changes:
runs-on: ubuntu-latest
name: Detect changes
outputs:
project: ${{ steps.changes.outputs.project }}
should_run: ${{ steps.should_run.outputs.should_run }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Detect Changes
uses: dorny/paths-filter@v3
id: changes
with:
filters: |
project:
- '**'
- 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.project == 'true' }}
needs: detect_changes
if: ${{ needs.detect_changes.outputs.should_run != 'false' }}

steps:
- name: Checkout
Expand Down

0 comments on commit 8dd1218

Please sign in to comment.