-
Notifications
You must be signed in to change notification settings - Fork 46
42 lines (34 loc) · 1.12 KB
/
build-buildspec-pr.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: build
on:
pull_request:
branches: [ "master" ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Checkout PR
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh pr checkout ${{ github.event.pull_request.number }}
git config --local user.email "reproducible-central@github.io"
git config --local user.name "Reproducible Central CI"
- name: Install dos2unix
run: sudo apt-get install -y dos2unix
- name: List changed files
id: changed-files
uses: tj-actions/changed-files@v45
- name: build-from-buildspec
run: |
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
if [[ $file == *.buildspec ]]; then
./rebuild.sh $file
bin/update-project-summary.sh "$(dirname $file)"
git add "$(dirname $file)"
git commit -m "./rebuild.sh $file"
git push
fi
done