1
0
mirror of https://github.com/dcarrillo/docker-nginx.git synced 2024-11-15 10:21:12 +00:00
docker-nginx/.github/workflows/main.yml

41 lines
788 B
YAML
Raw Normal View History

2019-12-15 16:54:03 +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
2020-03-07 18:08:09 +00:00
- name: shellcheck
uses: ludeeus/action-shellcheck@master
- name: hadolint
uses: brpaz/hadolint-action@master
2019-12-15 16:54:03 +00:00
- name: Build image
run: ./build.sh
- name: Run tests
run: ./tests/test.sh
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