-
-
Notifications
You must be signed in to change notification settings - Fork 85
66 lines (59 loc) · 2.01 KB
/
vulcano.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
name: Vulcano
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
pull_request_target:
types: [opened, reopened, edited, synchronize, ready_for_review]
paths:
- 'packages/**/PKGBUILD'
jobs:
labeling:
runs-on: ubuntu-latest
steps:
- name: Labeling
uses: actions-ecosystem/action-add-labels@v1
with:
labels: '1.has: package'
pkgcheck:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
fetch-depth: 0
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pkgcheck-arch
- name: Check Styling
run: |
CHANGED_FILES=($(git diff --name-only --diff-filter=ACMRT origin/${{ github.event.pull_request.base.ref }}...${{ github.event.pull_request.head.sha }} | tr '\n' ' '))
for FILE in "${CHANGED_FILES[@]}"; do
if [[ $(basename "$FILE") == "PKGBUILD" ]]; then
echo "Validating $FILE..."
pkgcheck "$FILE"
fi
done
validate:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
fetch-depth: 0
- name: Build Package
run: |
CHANGED_FILES=($(git diff --name-only --diff-filter=ACMRT origin/${{ github.event.pull_request.base.ref }}...${{ github.event.pull_request.head.sha }} | tr '\n' ' '))
for FILE in "${CHANGED_FILES[@]}"; do
if [[ $(basename "$FILE") == "PKGBUILD" ]]; then
echo "Building $FILE..."
podman build --load -t builder -f vulcano/Dockerfile $(dirname $FILE)
podman run --rm builder
fi
done