actions-hugo/.github/workflows/push.yml

31 lines
673 B
YAML
Raw Normal View History

name: Push workflow
2019-08-15 16:48:21 +02:00
on:
push:
branches:
- master
- 'release-v*'
jobs:
test:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@master
2019-08-15 17:08:44 +02:00
- name: Docker build and print Hugo version
env:
DOCKER_IMAGE: ${{ github.repository }}:${{ github.sha }}
2019-08-15 17:08:44 +02:00
run: |
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)
hadolint:
runs-on: macOS-10.14
steps:
- uses: actions/checkout@master
- name: hadolint
run: |
brew install hadolint
hadolint ./Dockerfile