feat: add Dockerfile and CI workflow for image build
This commit is contained in:
parent
695a1073a9
commit
a8a7d4296a
2 changed files with 56 additions and 0 deletions
18
.gitea/bunPipeline/Dockerfile
Normal file
18
.gitea/bunPipeline/Dockerfile
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
from imbios/bun-node
|
||||||
|
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Build and push image
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container: catthehacker/ubuntu:act-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Build Docker image
|
||||||
|
uses: https://git.kjan.de/actions/docker-build@v1
|
||||||
|
with:
|
||||||
|
name: node-npm
|
||||||
|
REGISTRY_USERNAME: ${{ secrets.REGISTRY_USERNAME }}
|
||||||
|
REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
|
||||||
|
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
|
||||||
|
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
|
38
.gitea/workflows/bun-image.yml
Normal file
38
.gitea/workflows/bun-image.yml
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
name: Build Docker Image
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
paths:
|
||||||
|
- package.json
|
||||||
|
- bun.lockb
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
paths:
|
||||||
|
- package.json
|
||||||
|
- bun.lockb
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up QEMU
|
||||||
|
uses: docker/setup-qemu-action@v3
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
|
- name: Build and push Docker image
|
||||||
|
uses: docker/build-push-action@v5
|
||||||
|
with:
|
||||||
|
context: .gitea/bunPipeline
|
||||||
|
file: .gitea/bunPipeline/Dockerfile
|
||||||
|
push: true
|
||||||
|
tags: git.simonis.lol/projects/bun-casino:latest # Change this to your repo
|
||||||
|
cache-from: type=registry,ref=git.simonis.lol/projects/bun-casino:latest
|
||||||
|
cache-to: type=inline
|
Reference in a new issue