2019-08-15 13:26:15 +02:00
|
|
|
name: Push workflow
|
|
|
|
|
2019-08-15 16:48:21 +02:00
|
|
|
on:
|
|
|
|
push:
|
2019-09-04 18:43:34 +02:00
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
- 'release-v*'
|
2019-08-15 13:26:15 +02:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
test:
|
2019-08-19 17:52:44 +02:00
|
|
|
runs-on: ubuntu-18.04
|
2019-08-15 13:26:15 +02:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@master
|
2019-09-04 18:43:34 +02:00
|
|
|
|
2019-08-15 17:08:44 +02:00
|
|
|
- name: Docker build and print Hugo version
|
2019-08-19 17:52:44 +02:00
|
|
|
env:
|
|
|
|
DOCKER_IMAGE: ${{ github.repository }}:${{ github.sha }}
|
2019-08-15 17:08:44 +02:00
|
|
|
run: |
|
2019-08-19 17:52:44 +02:00
|
|
|
docker build . --file Dockerfile --tag ${DOCKER_IMAGE} &&
|
|
|
|
docker run ${DOCKER_IMAGE} version ||
|
|
|
|
(echo -e "\e[31m[${GITHUB_WORKFLOW}] failed to build\e[m" && exit 1)
|
2019-09-08 14:18:27 +02:00
|
|
|
|
|
|
|
hadolint:
|
|
|
|
runs-on: macOS-10.14
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@master
|
|
|
|
- name: hadolint
|
|
|
|
run: |
|
|
|
|
brew install hadolint
|
|
|
|
hadolint ./Dockerfile
|