netbox-docker/.github/workflows/push.yml
Tobias Genannt a217ce8ffd Changed "build-branches.sh" to "build-next.sh"
The old version of "build-branches.sh" skipped the pushing of images when one of
them didn't change its sources. When looking at the Netbox branches I noticed
that the "master" branch only changes when there is a new release. Because we
build the new releases anyway in "build-latest.sh" that leaves "develop" and
"develop-*" which change regularly. The new script "build-next.sh" is responsible
for building "develop-*" as the next major release of Netbox. The build of
"develop" is moved to the Github Action build matrix. This has the additional
advantage of being faster because more builds are done in parallel.
2020-04-08 22:11:37 +02:00

42 lines
1.0 KiB
YAML

name: push
on:
push:
branches-ignore:
- release
pull_request:
branches-ignore:
- release
jobs:
build:
strategy:
matrix:
build_cmd:
- ./build-latest.sh
- PRERELEASE=true ./build-latest.sh
- ./build-next.sh
- ./build.sh develop
docker_from:
- '' # use the default of the DOCKERFILE
- python:3.7-alpine
- python:3.8-alpine
# - python:3.9-rc-alpine # disable until Netbox's unit tests work
fail-fast: false
runs-on: ubuntu-latest
name: Builds new Netbox Docker Images
steps:
- id: git-checkout
name: Checkout
uses: actions/checkout@v1
- id: docker-build
name: Build the image from '${{ matrix.docker_from }}' with '${{ matrix.build_cmd }}'
run: ${{ matrix.build_cmd }}
env:
DOCKER_FROM: ${{ matrix.docker_from }}
GH_ACTION: enable
- id: docker-test
name: Test the image
run: IMAGE="${FINAL_DOCKER_TAG}" ./test.sh
if: steps.docker-build.outputs.skipped != 'true'