-
Notifications
You must be signed in to change notification settings - Fork 28
43 lines (38 loc) · 1.18 KB
/
build-definitions-sync.yaml
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
name: Pull changes from build-definitions
on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
permissions:
contents: write
jobs:
build-definitions-sync:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
path: tssc-sample-pipelines
- name: Checkout build-definitions
uses: actions/checkout@v4
with:
repository: redhat-appstudio/build-definitions
path: build-definitions
- name: Synchronize build-definitions
run: |
export BUILD_DEFINITIONS=$GITHUB_WORKSPACE/build-definitions
$GITHUB_WORKSPACE/tssc-sample-pipelines/hack/import-build-definitions
- name: Commit changes
run: |
cd $GITHUB_WORKSPACE/tssc-sample-pipelines/
if [[ -z $(git status -s) ]]; then
echo 'No changes has been detected'
exit 0
fi
echo "Updates detected"
git diff
git config --global user.name 'RHTAP bot'
git config --global user.email 'rhtap-bot@noreply.rhtap.com'
git add .
git commit -m "Sync build-definitions"
git push