Skip to content

Commit

Permalink
CI: say chosen image name and only trigger if src files are modified …
Browse files Browse the repository at this point in the history
…or we want it to
  • Loading branch information
aaronliu0130 committed Feb 1, 2024
1 parent 4e1709a commit 3373e02
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
name: Build and run

on:
workflow_dispatch:
push:
branches: [ "master" ]
paths: ['src/**']
pull_request:
branches: [ "*" ]
paths: ['src/**']

jobs:
build:
Expand All @@ -27,5 +29,7 @@ jobs:
- name: Test
run: |
images=('/usr/local/share/icons/hicolor/128x128/apps/microsoft-edge.png' '/usr/local/share/icons/hicolor/128x128/apps/CMakeSetup.png' '/usr/local/doc/cmake/html/_static/file.png' '/usr/local/lib/android/sdk/extras/google/google_play_services/samples/tagmanager/cuteanimals/res/drawable/cat_1.jpg' '/usr/local/lib/android/sdk/extras/google/google_play_services/samples/wallet/res/drawable-ldpi/icon.png' '/usr/local/lib/android/sdk/extras/google/google_play_services/samples/wallet/res/drawable-hdpi/icon.png' '/usr/share/plymouth/themes/spinner/watermark.png' '/usr/share/apache2/icons/apache_pb.png' '/usr/share/doc/libpng-dev/examples/pngtest.png')
./src/tiv -w 160 -h 48 ${images[ $RANDOM % ${#images[@]} ]} # Get random image
image=${images[ $RANDOM % ${#images[@]} ]} # Get random image
./src/tiv -w 160 -h 48 $image # Get random image
echo $image
./src/tiv -w 160 -h 48 /usr/share/pixmaps # Dir mode

0 comments on commit 3373e02

Please sign in to comment.