Skip to content
Merged
Show file tree
Hide file tree
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
29 changes: 27 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name: CI

on:
push:
branches: [main]
pull_request:

permissions:
Expand All @@ -13,7 +11,32 @@ concurrency:
cancel-in-progress: true

jobs:
# Only changes to the app itself get built and tested. The jobs below still report a
# result when they're skipped, so main's required checks don't wait for them.
changes:
runs-on: ubuntu-latest
permissions:
pull-requests: read
outputs:
app: ${{ steps.filter.outputs.app }}
steps:
- id: filter
env:
GH_TOKEN: ${{ github.token }}
PR: ${{ github.event.number }}
run: |
# If the list can't be read, test anyway
files="$(gh api "repos/$GITHUB_REPOSITORY/pulls/$PR/files" --paginate --jq '.[].filename')" \
|| { echo "app=true" >> "$GITHUB_OUTPUT"; exit 0; }
if grep -qE '^(src-tauri/|ui/|package(-lock)?\.json$)' <<< "$files"; then
echo "app=true" >> "$GITHUB_OUTPUT"
else
echo "app=false" >> "$GITHUB_OUTPUT"
fi

windows:
needs: changes
if: ${{ !cancelled() && needs.changes.outputs.app != 'false' }}
runs-on: windows-latest
defaults:
run:
Expand Down Expand Up @@ -51,6 +74,8 @@ jobs:
node --check i18n.js

linux:
needs: changes
if: ${{ !cancelled() && needs.changes.outputs.app != 'false' }}
# The oldest supported Ubuntu, so the packages run on older distributions too
runs-on: ubuntu-22.04
steps:
Expand Down
2 changes: 1 addition & 1 deletion README.ar.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

<p align="center">
<a href="https://github.com/GENERAL868/flowbit/releases/latest"><img src="https://img.shields.io/github/v/release/GENERAL868/flowbit?label=release&color=3DDC97&cacheSeconds=600" alt="آخر إصدار"></a>
<a href="https://github.com/GENERAL868/flowbit/actions/workflows/ci.yml"><img src="https://github.com/GENERAL868/flowbit/actions/workflows/ci.yml/badge.svg" alt="حالة الفحص"></a>
<a href="https://github.com/GENERAL868/flowbit/actions/workflows/ci.yml"><img src="https://github.com/GENERAL868/flowbit/actions/workflows/ci.yml/badge.svg?event=pull_request" alt="حالة الفحص"></a>
<img src="https://img.shields.io/badge/platform-Windows%20%7C%20Linux-blue" alt="ويندوز ولينكس">
<a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue" alt="رخصة MIT"></a>
</p>
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<p align="center">
<a href="https://github.com/GENERAL868/flowbit/releases/latest"><img src="https://img.shields.io/github/v/release/GENERAL868/flowbit?label=release&color=3DDC97&cacheSeconds=600" alt="Latest release"></a>
<a href="https://github.com/GENERAL868/flowbit/actions/workflows/ci.yml"><img src="https://github.com/GENERAL868/flowbit/actions/workflows/ci.yml/badge.svg" alt="CI status"></a>
<a href="https://github.com/GENERAL868/flowbit/actions/workflows/ci.yml"><img src="https://github.com/GENERAL868/flowbit/actions/workflows/ci.yml/badge.svg?event=pull_request" alt="CI status"></a>
<img src="https://img.shields.io/badge/platform-Windows%20%7C%20Linux-blue" alt="Windows and Linux">
<a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue" alt="MIT license"></a>
</p>
Expand Down
Loading