1
0
mirror of https://github.com/dcarrillo/docker-nginx.git synced 2025-11-20 01:02:36 +00:00
Files
docker-nginx/.github/workflows/main.yml

40 lines
749 B
YAML

name: CI
on:
push:
branches:
- master
pull_request:
jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: shellcheck
uses: azbagheri/shell-linter@latest
- name: hadolint
uses: brpaz/hadolint-action@master
- name: Build image
run: make build
- name: Run tests
run: make tests
deploy:
runs-on: ubuntu-latest
needs:
- tests
if: github.event_name == 'push'
steps:
- uses: actions/checkout@v5
- name: Log in to dockerhub
run: echo "${{ secrets.DOCKERHUB_TOKEN }}" | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin
- name: Deploy image
run: make push-latest