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

Add detect changes to legacy #35

Merged
merged 1 commit into from
Oct 29, 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
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