diff --git a/.github/workflows/build_docker.yml b/.github/workflows/build_docker.yml index d0cc7b58..10ae1aee 100644 --- a/.github/workflows/build_docker.yml +++ b/.github/workflows/build_docker.yml @@ -1,4 +1,4 @@ -name: build_docker +name: 🐳 Build and Push Docker Image 📦 on: push: @@ -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!" diff --git a/Dockerfile b/Dockerfile index 8cea2c3a..5097fdf4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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