mirror of
https://github.com/dcarrillo/docker-nginx.git
synced 2025-01-08 19:16:47 +00:00
Add github workflow for CI
This commit is contained in:
parent
8084edf5fa
commit
8c08fcd4ca
34
.github/main.yml
vendored
Normal file
34
.github/main.yml
vendored
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
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: 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
|
Loading…
Reference in New Issue
Block a user