From 641f1856be6eac1397a3da24187cc120e5b8fb9c Mon Sep 17 00:00:00 2001 From: Seven Of Aces Date: Sat, 25 Jan 2025 19:40:37 -0800 Subject: [PATCH] . --- .forgejo/workflows/publish.yml | 23 +++++++++++++++++++++++ Dockerfile | 9 +++++++++ 2 files changed, 32 insertions(+) create mode 100644 .forgejo/workflows/publish.yml create mode 100644 Dockerfile diff --git a/.forgejo/workflows/publish.yml b/.forgejo/workflows/publish.yml new file mode 100644 index 0000000..a6b56d2 --- /dev/null +++ b/.forgejo/workflows/publish.yml @@ -0,0 +1,23 @@ +name: Publish to OCI + +on: + push: + branches: + - gold +jobs: + publish: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Set repository name to lowercase + run: echo "REPO_NAME=$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV + + - name: Authenticate with registry + run: docker login git.smgames.club -u ${{ github.repository_owner }} -p ${{ secrets.DOCKER_TOKEN }} + + - name: Build Docker container + run: docker build --no-cache --progress=plain -t git.smgames.club/${{ env.REPO_NAME }}:latest . + + - name: Push Docker container + run: docker push git.smgames.club/${{ env.REPO_NAME }}:latest diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..27fe266 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,9 @@ +FROM node:latest +WORKDIR /app +COPY package*.json ./ +RUN npm install +COPY . . +RUN npm run build +EXPOSE 80 +ENV NITRO_PORT 80 +CMD ["node .output/server/index.mjs"] \ No newline at end of file