-
Notifications
You must be signed in to change notification settings - Fork 2
53 lines (43 loc) · 1.39 KB
/
build.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
name: Build and run on GitHub Actions
on:
push:
branches: [ "**" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3
with:
repository: libical/vzic
ref: 4768ec8008a5af34f164439e605987e2933d471a
path: build/vzic
- name: Get settings into GitHub Actions
run: |
. ./settings.config
echo "VZIC_RELEASE_NAME=$VZIC_RELEASE_NAME" >> $GITHUB_ENV
- name: Run build script
run: ./build.sh
- name: Check, whether anything has changed.
run: |
if [[ `git status --porcelain` ]]; then
echo "File changes detected. Will commit and push."
echo "VZIC_PUSH_CHANGES=1" >> $GITHUB_ENV
else
echo "No file changes detected."
echo "VZIC_PUSH_CHANGES=0" >> $GITHUB_ENV
fi
- name: Commit and push changes
if: ${{ env.VZIC_PUSH_CHANGES == 1 }}
run: |
git config --global user.name 'GitHub Actions'
git config --global user.email '[email protected]'
git add .
git commit -am "Update tzdata and zoneinfo to version $VZIC_RELEASE_NAME."
git push
- name: Archive artifacts
if: ${{ env.VZIC_PUSH_CHANGES == 1 }}
uses: actions/upload-artifact@v3
with:
name: tzdbics_${{ env.VZIC_RELEASE_NAME }}
path: build/out/