Skip to content

Commit

Permalink
Update docker deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
devcshort committed Jun 6, 2024
1 parent 8acea99 commit b946036
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 6 deletions.
41 changes: 35 additions & 6 deletions .github/workflows/build_docker.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: build_docker
name: 🐳 Build and Push Docker Image 📦

on:
push:
Expand All @@ -7,20 +7,49 @@ on:

jobs:
docker:
name: 🏗️ Build and Push
runs-on: ubuntu-latest
steps:
- name: Set up QEMU
- name: 🛒 Checkout repository
uses: actions/checkout@v3

- name: 🖥️ Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx

- name: 🏗️ Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub

- name: 🔑 Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push

- name: 🏷️ Extract metadata for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: connect211/norse
tags: latest

- name: 🐳 Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
push: true
platforms: linux/amd64,linux/arm64
tags: connect211/norse:latest
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

- name: ✅ Verify Docker image
run: |
docker pull connect211/norse:latest
docker inspect connect211/norse:latest
- name: 📨 Notify on success
if: success()
run: echo "✅ Docker image built and pushed successfully!"

- name: 📨 Notify on failure
if: failure()
run: echo "❌ Docker image build or push failed!"
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ COPY --from=base /app/package*.json ./
COPY --from=base /app/app.defaults.json ./
COPY --from=base /app/next-i18next.config.js ./
COPY --from=base /app/next.config.mjs ./
COPY --from=base /app/postcss.config.js ./
COPY --from=base /app/tailwind.config.js ./
COPY --from=base /app/tsconfig.json ./
COPY --from=base /app/src ./src

RUN apk add g++ make py3-pip
Expand Down

0 comments on commit b946036

Please sign in to comment.