Compare commits
No commits in common. "271e8b9c0d2b560c784f6ba5546ff941fdac751c" and "02662d948833c488041a5eb1582266c855703c5c" have entirely different histories.
271e8b9c0d
...
02662d9488
@ -1,30 +0,0 @@
|
|||||||
name: Build and Publish Docker Image
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Login to Gitea Container Registry
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
|
||||||
registry: ${{ gitea.server_url }}
|
|
||||||
username: ${{ gitea.actor }}
|
|
||||||
password: ${{ secrets.REGISTRY_TOKEN }}
|
|
||||||
|
|
||||||
- name: Build and push Docker image
|
|
||||||
uses: docker/build-push-action@v5
|
|
||||||
with:
|
|
||||||
context: .
|
|
||||||
push: true
|
|
||||||
tags: |
|
|
||||||
${{ gitea.server_url }}/${{ gitea.repository }}:latest
|
|
||||||
${{ gitea.server_url }}/${{ gitea.repository }}:${{ gitea.sha }}
|
|
||||||
|
|
||||||
12
Dockerfile
12
Dockerfile
@ -1,12 +0,0 @@
|
|||||||
# Use official Bun image
|
|
||||||
FROM oven/bun:1-alpine
|
|
||||||
|
|
||||||
# Set working directory
|
|
||||||
WORKDIR /app
|
|
||||||
|
|
||||||
# Copy application files
|
|
||||||
COPY index.ts .
|
|
||||||
|
|
||||||
# Run the application
|
|
||||||
CMD ["bun", "run", "index.ts"]
|
|
||||||
|
|
||||||
51
README.md
51
README.md
@ -1,54 +1,3 @@
|
|||||||
<<<<<<< HEAD
|
|
||||||
# Hello World - Bun.js
|
|
||||||
|
|
||||||
A simple Hello World application built with Bun.js.
|
|
||||||
|
|
||||||
## Run Locally
|
|
||||||
|
|
||||||
```bash
|
|
||||||
bun run index.ts
|
|
||||||
```
|
|
||||||
|
|
||||||
## Run with Docker
|
|
||||||
|
|
||||||
Build the image:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
docker build -t hello-bun .
|
|
||||||
```
|
|
||||||
|
|
||||||
Run the container:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
docker run hello-bun
|
|
||||||
```
|
|
||||||
|
|
||||||
## CI/CD Pipeline
|
|
||||||
|
|
||||||
This repo includes a Gitea Actions workflow that automatically builds and publishes the Docker image to Gitea's container registry on every push to `main`.
|
|
||||||
|
|
||||||
### Setup Required
|
|
||||||
|
|
||||||
1. **Enable Actions** in your Gitea repository settings
|
|
||||||
2. **Create a secret** named `REGISTRY_TOKEN`:
|
|
||||||
- Go to Repository → Settings → Actions → Secrets
|
|
||||||
- Add a new secret `REGISTRY_TOKEN` with your Gitea access token
|
|
||||||
|
|
||||||
### Pull the Published Image
|
|
||||||
|
|
||||||
After the pipeline runs, pull your image:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
docker pull <your-gitea-url>/<owner>/<repo>:latest
|
|
||||||
```
|
|
||||||
|
|
||||||
## Output
|
|
||||||
|
|
||||||
```
|
|
||||||
Hello World! 🌍
|
|
||||||
```
|
|
||||||
=======
|
|
||||||
|
|
||||||
|
|
||||||
Test
|
Test
|
||||||
>>>>>>> origin/main
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user