Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 82e7ccd

Browse files
committed
ci: publish to GHCR & docs: clean up README.md and point to original fork
1 parent 1de7364 commit 82e7ccd

2 files changed

Lines changed: 42 additions & 96 deletions

File tree

.github/workflows/docker-publish.yml

Lines changed: 40 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,13 @@ jobs:
4343
username: ${{ env.DOCKER_USERNAME }}
4444
password: ${{ env.DOCKER_PASSWORD }}
4545

46+
- name: Log in to GHCR
47+
uses: docker/login-action@v3
48+
with:
49+
registry: ${{ env.REGISTRY }}
50+
username: ${{ github.actor }}
51+
password: ${{ secrets.GITHUB_TOKEN }}
52+
4653
- name: Extract version from backend/Cargo.toml
4754
id: package_version
4855
run: |
@@ -53,32 +60,55 @@ jobs:
5360
- name: Generate Docker Metadata
5461
id: meta
5562
run: |
63+
LOWER_IMAGE_NAME_GHCR=$(echo "${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}" | tr '[:upper:]' '[:lower:]')
5664
LOWER_IMAGE_NAME_DOCKER=$(echo "ubermetroid/beam" | tr '[:upper:]' '[:lower:]')
5765
VERSION=${{ steps.package_version.outputs.VERSION }}
5866
59-
# Initialize tags list
60-
TAGS=""
67+
# Initialize GHCR tags
68+
GHCR_TAGS="${LOWER_IMAGE_NAME_GHCR}:${VERSION}"
69+
if [ "${{ github.ref }}" = "refs/heads/main" ]; then
70+
GHCR_TAGS="${GHCR_TAGS},${LOWER_IMAGE_NAME_GHCR}:latest"
71+
elif [ "${{ github.ref }}" = "refs/heads/dev" ]; then
72+
GHCR_TAGS="${GHCR_TAGS},${LOWER_IMAGE_NAME_GHCR}:dev"
73+
fi
6174
62-
# Add Docker Hub tags (if credentials exist)
75+
# Initialize Docker Hub tags (if credentials exist)
76+
DOCKER_TAGS=""
6377
if [ "${{ secrets.DOCKER_USERNAME }}" != "" ]; then
64-
TAGS="${LOWER_IMAGE_NAME_DOCKER}:${VERSION}"
78+
DOCKER_TAGS="${LOWER_IMAGE_NAME_DOCKER}:${VERSION}"
6579
if [ "${{ github.ref }}" = "refs/heads/main" ]; then
66-
TAGS="${TAGS},${LOWER_IMAGE_NAME_DOCKER}:latest"
80+
DOCKER_TAGS="${DOCKER_TAGS},${LOWER_IMAGE_NAME_DOCKER}:latest"
6781
elif [ "${{ github.ref }}" = "refs/heads/dev" ]; then
68-
TAGS="${TAGS},${LOWER_IMAGE_NAME_DOCKER}:dev"
82+
DOCKER_TAGS="${DOCKER_TAGS},${LOWER_IMAGE_NAME_DOCKER}:dev"
6983
fi
7084
fi
7185
72-
echo "TAGS=${TAGS}" >> $GITHUB_OUTPUT
73-
echo "Generated tags: ${TAGS}"
86+
echo "GHCR_TAGS=${GHCR_TAGS}" >> $GITHUB_OUTPUT
87+
echo "DOCKER_TAGS=${DOCKER_TAGS}" >> $GITHUB_OUTPUT
88+
echo "Generated GHCR tags: ${GHCR_TAGS}"
89+
echo "Generated Docker Hub tags: ${DOCKER_TAGS}"
90+
91+
- name: Build and Push to Docker Hub
92+
if: ${{ env.DOCKER_USERNAME != '' }}
93+
uses: docker/build-push-action@v6
94+
with:
95+
context: .
96+
platforms: ${{ env.PLATFORMS }}
97+
push: true
98+
tags: ${{ steps.meta.outputs.DOCKER_TAGS }}
99+
cache-from: type=gha
100+
cache-to: type=gha,mode=max
101+
provenance: false
102+
build-args: |
103+
BUILDKIT_INLINE_CACHE=1
74104
75-
- name: Build and Push Docker Image
105+
- name: Build and Push to GHCR
76106
uses: docker/build-push-action@v6
77107
with:
78108
context: .
79109
platforms: ${{ env.PLATFORMS }}
80110
push: true
81-
tags: ${{ steps.meta.outputs.TAGS }}
111+
tags: ${{ steps.meta.outputs.GHCR_TAGS }}
82112
cache-from: type=gha
83113
cache-to: type=gha,mode=max
84114
provenance: false

README.md

Lines changed: 2 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Beam is a lightweight, self-hosted, and high-performance file sharing web applic
1010

1111
## 🐳 Container Installation
1212

13-
### Option 1: Docker Compose (Recommended)
13+
1414

1515
1. Create a `docker-compose.yml` file:
1616

@@ -44,20 +44,6 @@ docker compose up -d
4444

4545
3. Open your browser and navigate to `http://localhost:4401`.
4646

47-
### Option 2: Docker CLI
48-
49-
Run the following command to start the container:
50-
51-
```bash
52-
docker run -d \
53-
--name beam \
54-
--restart unless-stopped \
55-
-p 4401:4401 \
56-
-v $(pwd)/uploads:/app/uploads \
57-
-e BEAM_PIN=123456 \
58-
-e SHOW_FILE_LIST=true \
59-
ubermetroid/beam:latest
60-
```
6147

6248
---
6349

@@ -87,78 +73,8 @@ Configure these settings inside your Docker Compose environment or container env
8773
| `ENABLE_PRINT` | Enable the print button in the navigation header (true/false). | `true` |
8874
| `MAX_ATTEMPTS` | Number of failed PIN attempts permitted before locking out the user client IP address. | `5` |
8975

90-
## 📂 Repository Structure
91-
92-
```
93-
.
94-
├── backend/
95-
│ ├── Cargo.toml
96-
│ └── src
97-
│ ├── config.rs
98-
│ ├── main.rs
99-
│ ├── routes
100-
│ │ ├── auth.rs
101-
│ │ ├── files
102-
│ │ │ ├── helpers.rs
103-
│ │ │ ├── mod.rs
104-
│ │ │ └── ops.rs
105-
│ │ ├── mod.rs
106-
│ │ └── upload
107-
│ │ ├── cancel.rs
108-
│ │ ├── chunk.rs
109-
│ │ ├── init.rs
110-
│ │ ├── metadata.rs
111-
│ │ ├── mod.rs
112-
│ │ └── utils.rs
113-
│ ├── security.rs
114-
│ ├── tests.rs
115-
│ └── utils.rs
116-
└── frontend/
117-
├── Assets
118-
│ ├── app.css
119-
│ ├── assets
120-
│ │ ├── icon.png
121-
│ │ └── icon.svg
122-
│ ├── base.css
123-
│ ├── header.css
124-
│ ├── login.css
125-
│ └── service-worker.js
126-
├── Cargo.toml
127-
├── index.html
128-
└── src
129-
├── api.rs
130-
├── app
131-
│ ├── mod.rs
132-
│ ├── update_config.rs
133-
│ ├── update_files.rs
134-
│ ├── update_pin.rs
135-
│ ├── update_toast.rs
136-
│ ├── update_upload.rs
137-
│ ├── upload_task.rs
138-
│ └── view
139-
│ ├── explorer.rs
140-
│ ├── mod.rs
141-
│ ├── pin_entry.rs
142-
│ └── uploader.rs
143-
├── header.rs
144-
├── i18n
145-
│ ├── de.rs
146-
│ ├── en.rs
147-
│ ├── es.rs
148-
│ ├── fr.rs
149-
│ ├── ja.rs
150-
│ ├── pt.rs
151-
│ ├── ru.rs
152-
│ └── zh.rs
153-
├── i18n.rs
154-
├── js_api.rs
155-
├── main.rs
156-
├── storage.rs
157-
├── types.rs
158-
└── utils.rs
159-
```
16076

16177

16278
---
16379

164-
*Note: This repository was forked from [RustDrop](https://github.com/UberMetroid/RustDrop).*
80+
*Note: This repository was forked from [DumbDrop](https://github.com/DumbWareio/DumbDrop).*

0 commit comments

Comments
 (0)