docker-postfix/.github/workflows/main.yml

41 lines
782 B
YAML
Raw Normal View History

2020-03-08 12:27:44 +00:00
name: CI
on:
push:
branches:
- master
pull_request:
jobs:
tests:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- uses: actions/checkout@v1
- name: shellcheck
2020-05-24 16:25:06 +00:00
uses: azohra/shell-linter@v0.4.0
2020-03-08 12:27:44 +00:00
- name: hadolint
uses: brpaz/hadolint-action@master
- name: Build image
run: ./build.sh
- name: Run tests
2020-03-08 12:30:01 +00:00
run: ./tests/test.sh
2020-03-08 12:27:44 +00:00
deploy:
runs-on: ubuntu-latest
if: github.event_name == 'push'
steps:
- uses: actions/checkout@v1
- name: Log in to dockerhub
run: echo "${{ secrets.DOCKERHUB_TOKEN }}" | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin
- name: Deploy image
run: ./build.sh --push --latest