-
-
Notifications
You must be signed in to change notification settings - Fork 84
42 lines (40 loc) · 1.22 KB
/
autotools.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
name: Autotools check
on:
pull_request:
branches: [ develop ]
push:
branches: [ develop ]
jobs:
default-build:
name: Check if autotools need to be run
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- uses: actions/checkout@v4
- name: install dependencies
run: sudo apt-get install build-essential autoconf
- name: Stage configure with revision removed
run: |
for i in `find . -name configure`; do sed -i 's/From configure.ac .*//' $i; git add $i; done
- name: Run autotools
run: misc/runautotools
- name: Remove configure revision again
run: |
for i in `find . -name configure`; do sed -i 's/From configure.ac .*//' $i; done
- name: Check diff
env:
GH_TOKEN: ${{ github.token }}
run: |
git diff | tee .gitdiff
if [ "${{ github.event_name }}" = "pull_request" ]; then
if [ -s .gitdiff ]; then
gh pr edit "${{ github.event.number }}" --add-label "misc/runautotools"
else
gh pr edit "${{ github.event.number }}" --remove-label "misc/runautotools"
fi
else
if [ -s .gitdiff ]; then
exit 1
fi
fi