feat: build Docker image locally without pushing to registry
Some checks failed
CI / build-and-test (push) Failing after 12m44s

This commit is contained in:
sokol
2026-02-20 10:33:17 +03:00
parent 083d7dd662
commit 1c27b68965
2 changed files with 23 additions and 45 deletions

View File

@@ -20,15 +20,13 @@
**Jobs:**
- Build React application
- Build Docker image
- Push to Docker registry
- Build Docker image locally
- Save image as tarball artifact
- Upload artifact for download (30 days retention)
**Required Secrets:**
- `DOCKER_USERNAME` - Docker registry username
- `DOCKER_PASSWORD` - Docker registry password/token
**Optional Variables:**
- `DOCKER_REGISTRY` - Registry URL (default: `docker.io`)
**Output:**
- Docker image artifact: `configucci.tar`
- Can be downloaded and loaded with: `docker load -i configucci.tar`
### 3. Deploy (`deploy.yml`)
**Triggers:** Push to `main` branch
@@ -59,12 +57,6 @@ ENABLED = true
### 2. Configure Secrets
Go to your repository → Settings → Secrets and add:
**For Docker Build:**
```
DOCKER_USERNAME=your-username
DOCKER_PASSWORD=your-password-or-token
```
**For Deployment:**
```
DEPLOY_HOST=your-server.com
@@ -73,12 +65,7 @@ DEPLOY_KEY=<paste-ssh-private-key>
DEPLOY_PORT=22
```
### 3. Configure Variables (Optional)
Go to your repository → Settings → Variables and add:
```
DOCKER_REGISTRY=registry.example.com
```
**No Docker secrets needed** - images are built locally and downloaded as artifacts!
## Workflow Files Location
`.gitea/workflows/`
@@ -107,6 +94,5 @@ Add these to your README.md:
```markdown
[![CI](https://git.six83.ru/ssa/configucci/actions/workflows/ci.yml/badge.svg)](https://git.six83.ru/ssa/configucci/actions/workflows/ci.yml)
[![Docker Build](https://git.six83.ru/ssa/configucci/actions/workflows/docker-build.yml/badge.svg)](https://git.six83.ru/ssa/configucci/actions/workflows/docker-build.yml)
[![Deploy](https://git.six83.ru/ssa/configucci/actions/workflows/deploy.yml/badge.svg)](https://git.six83.ru/ssa/configucci/actions/workflows/deploy.yml)
```