-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (48 loc) · 1.31 KB
/
test-sdd-install-remove-changed-apps.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Run sdd install/remove for changed apps
on:
workflow_dispatch:
pull_request:
paths:
- "apps/*@*"
push:
branches: [ master, main ]
paths:
- "apps/*@*"
jobs:
list-of-changed-apps:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get changed appfiles
id: changed-files
uses: tj-actions/changed-files@v44
with:
json: true
files: |
apps/*@*
- name: Generate matrix with changed appfiles
id: set-matrix
run: >-
{ echo -n "matrix=";
echo "${{ steps.changed-files.outputs.all_changed_files }}" |
jq -c 'map(split("/")[-1]) | unique'; } >> "$GITHUB_OUTPUT"
sdd-install-remove-app:
needs: list-of-changed-apps
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
appname: ${{ fromJson(needs.list-of-changed-apps.outputs.matrix) }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Install/remove ${{ matrix.appname }}
run: |
./bin/sdd install ${{ matrix.appname }}
./bin/sdd list --installed
./bin/sdd remove ${{ matrix.appname }}