-
Notifications
You must be signed in to change notification settings - Fork 6
67 lines (58 loc) · 2.32 KB
/
ci.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
67
name: Build and update base images
on:
push:
branches:
- master
#- development
pull_request:
branches:
- master
#- development
schedule:
- cron: 0 0 * * * # Schedule nightly builds
workflow_dispatch:
jobs:
ci:
name: CI
runs-on: ubuntu-latest
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
steps:
- name: Checkout the repository
uses: actions/checkout@v2
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y expect
- name: Setup the environment
run: |
export GITHUB_BRANCH=${GITHUB_REF##*/}
echo "GITHUB_BRANCH=${GITHUB_BRANCH}" >> $GITHUB_ENV
if [ "$GITHUB_EVENT_NAME" == "pull_request" ]; then export GITHUB_PULL_REQUEST=true; else export GITHUB_PULL_REQUEST=false; fi
echo "GITHUB_PULL_REQUEST=${GITHUB_PULL_REQUEST}" >> $GITHUB_ENV
- name: Setup the base images
run: .ci/setup.sh
- name: Check for base image updates
## FIXME: Temporary fix for GH Actions not having a TTY
## https://github.com/actions/runner/issues/241#issuecomment-924327172
shell: 'script --return --quiet --command "bash {0}"'
run: |
source .ci/update_check.sh
# echo "UPDATE_UBUNTU_16_04=${UPDATE_UBUNTU_16_04}" >> $GITHUB_ENV
echo "UPDATE_UBUNTU_18_04=${UPDATE_UBUNTU_18_04}" >> $GITHUB_ENV
echo "UPDATE_UBUNTU_20_04=${UPDATE_UBUNTU_20_04}" >> $GITHUB_ENV
# echo "UPDATE_ALPINE_3_5=${UPDATE_ALPINE_3_5}" >> $GITHUB_ENV
# echo "UPDATE_ALPINE_3_10=${UPDATE_ALPINE_3_10}" >> $GITHUB_ENV
echo "UPDATE_ALPINE_3_12=${UPDATE_ALPINE_3_12}" >> $GITHUB_ENV
echo "UPDATE_ALPINE_3_14=${UPDATE_ALPINE_3_14}" >> $GITHUB_ENV
echo "UPDATE_ALPINE_EDGE=${UPDATE_ALPINE_EDGE}" >> $GITHUB_ENV
- name: Build the base images
run: .ci/build.sh
- name: Test the base images
## FIXME: Temporary fix for GH Actions not having a TTY
## https://github.com/actions/runner/issues/241#issuecomment-924327172
shell: 'script --return --quiet --command "bash {0}"'
run: unbuffer .ci/test.sh
- name: Push the base images
run: .ci/push.sh