Skip to content

Commit

Permalink
feat: automatic build with actions
Browse files Browse the repository at this point in the history
  • Loading branch information
rohittp0 committed Apr 20, 2024
1 parent 677d710 commit 7ab5a51
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 4 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Build and Push Docker Images

on:
push:
branches:
- main

workflow_dispatch:

jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Login to Docker Registry
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .
file: Dockerfile
push: true
tags: |
rohittp0/nginx-secure:${{ github.sha }}
rohittp0/nginx-secure:latest
4 changes: 0 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,3 @@ services:
- ./certs:/etc/letsencrypt/
restart: unless-stopped
env_file: docker.env

web:
image: python:3.11
command: python -m http.server 8000

0 comments on commit 7ab5a51

Please sign in to comment.