Skip to content

Commit

Permalink
Merge pull request #10 from bdeak4/feature/docker-image-build-ci
Browse files Browse the repository at this point in the history
add docker image build ci
  • Loading branch information
bdeak4 authored Nov 15, 2023
2 parents 88571f4 + 85807f2 commit a2b5bcd
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 1 deletion.
41 changes: 41 additions & 0 deletions .github/workflows/docker-image-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Docker image build

on:
push:
branches:
- master

workflow_dispatch:

jobs:
docker-image-build:
name: Docker image build
runs-on: ubuntu-latest

permissions:
contents: read
packages: write

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Login to Docker Hub
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push docker image
uses: docker/build-push-action@v4
with:
context: .
file: ./Dockerfile
push: true
tags: ghcr.io/bdeak4/chatter:${{ github.sha }},ghcr.io/bdeak4/chatter:latest
cache-from: type=gha
cache-to: type=gha,mode=max
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ services:
- .:/app
restart: on-failure
ports:
- 4002:5000
- 5000:5000
env_file:
- .env
depends_on:
Expand Down

0 comments on commit a2b5bcd

Please sign in to comment.