CI and container publishing
All checks were successful
Build and push latest / publish (push) Successful in 1m2s
All checks were successful
Build and push latest / publish (push) Successful in 1m2s
This commit is contained in:
parent
9bdd31ac5f
commit
7717483821
27
.gitea/workflows/ci.yml
Normal file
27
.gitea/workflows/ci.yml
Normal file
@ -0,0 +1,27 @@
|
||||
name: Build and push latest
|
||||
run-name: Build and push latest
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
runs-on: ubuntu-latest
|
||||
if: gitea.ref == 'refs/heads/master'
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Login to registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: git.skullnet.me
|
||||
username: ${{ secrets.REGISTRY_USERNAME }}
|
||||
password: ${{ secrets.REGISTRY_PASSWORD }}
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
push: true
|
||||
tags: "git.skullnet.me/erki/embeddingcpp:latest"
|
||||
file: Dockerfile
|
||||
17
Dockerfile
Normal file
17
Dockerfile
Normal file
@ -0,0 +1,17 @@
|
||||
FROM alpine:3.20 AS build
|
||||
|
||||
RUN apk add --update hugo
|
||||
|
||||
WORKDIR /opt/hugoapp
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN hugo
|
||||
|
||||
FROM nginx:1.27.1-alpine
|
||||
|
||||
WORKDIR /usr/share/nginx/html
|
||||
|
||||
COPY --from=build /opt/hugoapp/public .
|
||||
|
||||
EXPOSE 80/tcp
|
||||
Loading…
x
Reference in New Issue
Block a user