Skip to content

fix: multi-stage

fix: multi-stage #139

Workflow file for this run

# gokaygurcan/dockerfile-nginx
name: nginx
on:
push:
pull_request:
branches:
- main
env:
GITHUB: ${{ toJson(github) }}
jobs:
nginx:
name: nginx
runs-on: ubuntu-latest
env:
CI: true
steps:
- id: sanity-check
name: Sanity check
run: |
printenv
- id: checkout
name: Checkout
uses: actions/checkout@v4
- id: build
name: Build image
run: |
docker build --file Dockerfile --tag gokaygurcan/nginx:latest .
docker ps -a
- id: test
name: Test
run: |
docker run --rm --name nginx gokaygurcan/nginx nginx -V
- id: login
name: Login to Docker Hub
uses: docker/login-action@v3
if: |
github.ref == 'refs/heads/main'
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- id: push
name: Push to Docker Registry
uses: docker/build-push-action@v6
if: |
github.ref == 'refs/heads/main'
with:
context: .
push: true
tags: gokaygurcan/nginx:latest