Skip to content

Commit

Permalink
Merge pull request #27 from neonwatty/docker-build
Browse files Browse the repository at this point in the history
docker-build yaml added
  • Loading branch information
neonwatty authored Jul 24, 2024
2 parents 781e1a4 + 556162e commit d1749c2
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 3 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: 'DockerBuild'

on:
push:
tags:
- 'v*'

jobs:
Build_And_Push:
runs-on: ubuntu-22.04
permissions:
contents: read
packages: write

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Log in to Github Docker Image Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.TOKEN_GITHUB }}

# Uncomment to use Docker Hub
# - name: Login to Docker Hub
# uses: docker/login-action@v3
# with:
# username: ${{ secrets.USERNAME_DOCKERHUB }}
# password: ${{ secrets.TOKEN_DOCKERHUB }}

- name: Docker Meta
id: meta
uses: docker/metadata-action@v4
with:
images: |
ghcr.io/${{ github.actor }}/meme-search
# ${{ secrets.DOCKERHUB_USERNAME }}/meme-search
tags: type=ref,event=tag
flavor: latest=true

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set Buildx
uses: docker/setup-buildx-action@v3

- name: Build and Upload for AMD64 and ARM64
uses: docker/build-push-action@v4
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
6 changes: 3 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
version: '3.8'

services:
meme_search:
build:
context: .
image: meme_search
image: ghcr.io/neonwatty/meme-search:latest
container_name: meme_search
ports:
- 8501:8501
Expand Down

0 comments on commit d1749c2

Please sign in to comment.