forked from ivan-hc/AM
-
Notifications
You must be signed in to change notification settings - Fork 0
90 lines (79 loc) · 2.31 KB
/
101.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
name: "Test 100 random apps"
env:
TERM: xterm
on:
push:
branches: '**'
paths:
- 'modules/**'
- INSTALL
- APP-MANAGER
- '!programs/**'
pull_request:
branches: '**'
paths:
- 'modules/**'
- INSTALL
- APP-MANAGER
- '!programs/**'
workflow_dispatch:
schedule:
- cron: '0 23 * * *'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
install:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up environment and install AM
run: |
printf '\n\tCreating directory structure...\n'
mkdir -p results /usr/local/bin
printf '\n\tInstalling dependencies...\n'
sudo apt install -y wget curl zsync 2> /dev/null
printf '\n\tMaking needed files executable...\n'
chmod +x ./INSTALL
printf '\n\tInstalling AM...\n'
sudo ./INSTALL
printf '\n'
# Save apps list to a file in the workspace
- name: Generate and save apps list
run: |
printf '\tSetting up environment...\n'
chmod +x .github/workflows/generate-matrix.sh
./.github/workflows/generate-matrix.sh > apps.txt
shell: bash
# Persist apps list as an artifact
- name: Persist apps list
uses: actions/upload-artifact@v2
with:
name: apps-list
path: apps.txt
tests:
runs-on: ubuntu-latest
needs: install
steps:
- name: Checkout repository
uses: actions/checkout@v4
# Download the workspace with artifacts
- name: Download workspace
uses: actions/download-artifact@v2
with:
name: apps-list
path: ${{ github.workspace }}
# You can now access apps.txt in the workspace
# Example: Read and use apps.txt
- name: Read apps list
run: |
cat ${{ github.workspace }}/apps.txt
# Example: Iterate over apps and perform actions
- name: Iterate over apps
run: |
while read -r app; do
printf '\n\tInstalling application: $app\n'
am install "$app"
# Add additional steps as needed (e.g., testing, uninstalling)
done < ${{ github.workspace }}/apps.txt