Skip to content

Commit

Permalink
fix: ci
Browse files Browse the repository at this point in the history
  • Loading branch information
zaneschepke committed Nov 3, 2024
1 parent d70ef65 commit 7b443ad
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 18 deletions.
33 changes: 16 additions & 17 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,29 +34,28 @@ on:

jobs:
check_commits:
name: Check for New Commits
runs-on: ubuntu-latest
outputs:
has_new_commits: ${{ steps.check.outputs.new_commits }}

steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Checkout Repository
uses: actions/checkout@v3
with:
fetch-depth: 0 # This fetches all history so we can check commits

- name: Check for new commits in the last 23 hours
id: check_commits
- name: Check for new commits
id: check
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# Get the current time and the time 23 hours ago in ISO 8601 format
now=$(date --utc +%Y-%m-%dT%H:%M:%SZ)
past=$(date --utc --date='23 hours ago' +%Y-%m-%dT%H:%M:%SZ)
# Fetch commit history and check for commits in the last 23 hours
if git rev-list --since="$past" --count HEAD > /dev/null; then
echo "New commits found in the last 23 hours."
echo "::set-output name=new_commits::true"
else
echo "No new commits found in the last 23 hours."
echo "::set-output name=new_commits::false"
fi
# This script checks for commits newer than 23 hours ago
NEW_COMMITS=$(git rev-list --count --after="$(date -Iseconds -d '23 hours ago')" ${{ github.sha }})
echo "new_commits=$NEW_COMMITS" >> $GITHUB_OUTPUT
build:
needs: check_commits
if: ${{ needs.check_commits.outputs.new_commits == 'true' && inputs.track != 'none' }}
if: ${{ needs.check_commits.outputs.has_new_commits == 'true' && inputs.release_type != 'none' }}
name: Build Signed APK
runs-on: ubuntu-latest
env:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ class TunnelControlTile : TileService(), LifecycleOwner {

private suspend fun updateTileState() {
val lastActive = appDataRepository.getStartTunnelConfig()
Timber.d("Got config $lastActive")
lastActive?.let {
updateTile(it)
}
Expand Down

0 comments on commit 7b443ad

Please sign in to comment.