Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

housekeep/Detect changes #34

Merged
merged 19 commits into from
Oct 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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