chore: add build actions
Some checks failed
Publish image / create-docker-images (push) Failing after 1m1s
Some checks failed
Publish image / create-docker-images (push) Failing after 1m1s
This commit is contained in:
parent
e9d50af0ae
commit
7fd264d01f
2 changed files with 36 additions and 0 deletions
27
.forgejo/workflows/build-docker-image.yaml
Normal file
27
.forgejo/workflows/build-docker-image.yaml
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
name: Publish image
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
create-docker-images:
|
||||||
|
runs-on: host
|
||||||
|
steps:
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
|
- name: Login to Docker Hub
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: git.alecodes.page
|
||||||
|
username: ${{ vars.CONTAINER_REGISTRY_USER }}
|
||||||
|
password: ${{ secrets.CONTAINER_REGISTRY_TOKEN }}
|
||||||
|
|
||||||
|
- name: Build and push
|
||||||
|
uses: docker/build-push-action@v6
|
||||||
|
with:
|
||||||
|
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
||||||
|
push: true
|
||||||
|
tags: |
|
||||||
|
git.alecodes.page/alecodes/page:latest
|
||||||
|
git.alecodes.page/alecodes/page:${{ github.sha }}
|
||||||
9
Dockerfile
Normal file
9
Dockerfile
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
FROM ghcr.io/getzola/zola:v0.19.2 AS builder
|
||||||
|
|
||||||
|
COPY . /project
|
||||||
|
WORKDIR /project
|
||||||
|
RUN ["zola", "build"]
|
||||||
|
|
||||||
|
FROM ghcr.io/static-web-server/static-web-server:2
|
||||||
|
WORKDIR /
|
||||||
|
COPY --from=builder /project/dist /public
|
||||||
Loading…
Add table
Add a link
Reference in a new issue