-
Notifications
You must be signed in to change notification settings - Fork 1
53 lines (50 loc) · 1.5 KB
/
build-test-publish.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: Github-CI Push/PR datawave
on:
push:
pull_request:
env:
# secrets can be set in settings/secrets on github
DOCKER_REGISTRY: ${{ secrets.DOCKER_REGISTRY }}
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
jobs:
build:
name: building datawave
runs-on: ${{ matrix.os }}
strategy:
matrix:
python: [3.9]
os: [ubuntu-22.04]
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: setup python environment
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- name: show versions
run: ./.github/show_system_versions.bash
- name: set owner variable
run: echo "OWNER=${GITHUB_REPOSITORY%/*}" >> $GITHUB_ENV
- name: set docker image tag
if: github.ref != 'refs/heads/master'
run: echo "DOCKER_IMAGE_TAG=${GITHUB_REF##*/}" >> $GITHUB_ENV
- name: get current image if available
run: make pull-latest || true
- name: build
run: |
make VERSION
make build
make info-build
- name: test
run: make tests
- if: github.event_name == 'push' && github.ref == 'refs/heads/master'
name: push
run: |
./.github/dockerhub_login.bash
make push
- if: github.event_name == 'push' && github.ref != 'refs/heads/master'
name: push
run: |
./.github/dockerhub_login.bash
make push-version