Add publish workflow
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 6s
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 6s
This commit is contained in:
parent
5bf14e956f
commit
c8ef6f6d91
@ -52,6 +52,13 @@ COPY --from=builder /app/public ./public
|
|||||||
RUN mkdir .next
|
RUN mkdir .next
|
||||||
RUN chown nextjs:nodejs .next
|
RUN chown nextjs:nodejs .next
|
||||||
|
|
||||||
|
# Automatically leverage output traces to reduce image size
|
||||||
|
# https://nextjs.org/docs/advanced-features/output-file-tracing
|
||||||
|
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
|
||||||
|
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
|
||||||
|
|
||||||
|
USER nextjs
|
||||||
|
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
|
|
||||||
ENV PORT 3000
|
ENV PORT 3000
|
||||||
|
|||||||
33
public/.gitea/workflows/publish.yml
Normal file
33
public/.gitea/workflows/publish.yml
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
name: Docker Build & Publish
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [main]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Build Docker
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Check out repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx 🚀
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
|
- name: Login to Docker Hub 🚢
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
|
||||||
|
|
||||||
|
- name: Build and push 🏗️
|
||||||
|
uses: docker/build-push-action@v2
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: ./Dockerfile
|
||||||
|
push: false
|
||||||
|
# tags: |
|
||||||
|
# ${{ secrets.DOCKER_HUB_USERNAME}}/{docker_repository}:${{ github.sha }}
|
||||||
|
# ${{ secrets.DOCKER_HUB_USERNAME}}/{docker_repository}:latest
|
||||||
Loading…
x
Reference in New Issue
Block a user