Some checks are pending
Build and Push Docker Image / build-and-push (push) Waiting to run
- Automatically builds Docker image on push to main - Pushes to Forgejo container registry - Tags with latest, branch name, and commit SHA - Includes build cache optimization 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
53 lines
1.4 KiB
Markdown
53 lines
1.4 KiB
Markdown
# Forgejo Actions Workflows
|
|
|
|
This directory contains CI/CD workflows for the RateMyClient project.
|
|
|
|
## docker-build.yml
|
|
|
|
Automatically builds and pushes Docker images to the Forgejo Container Registry.
|
|
|
|
### What it does:
|
|
- Triggers on push to `main` branch
|
|
- Builds the Docker image using the Dockerfile
|
|
- Pushes to `forgejo.sivic.me/kevinsivic/ratemyclient`
|
|
- Tags images with:
|
|
- `latest` (for main branch)
|
|
- Branch name
|
|
- Git commit SHA
|
|
- Semantic versions (if tagged)
|
|
|
|
### Setup Required:
|
|
|
|
1. **Enable Actions in Forgejo:**
|
|
- Go to repository Settings → Actions
|
|
- Enable Actions for this repository
|
|
|
|
2. **Configure Forgejo Runner:**
|
|
- Forgejo needs a runner to execute workflows
|
|
- Follow: https://forgejo.org/docs/latest/admin/actions/
|
|
|
|
3. **Access Token (Already configured):**
|
|
- The workflow uses `${{ secrets.GITEA_TOKEN }}`
|
|
- This is automatically provided by Forgejo
|
|
|
|
### Image Location:
|
|
|
|
After successful build, pull the image:
|
|
```bash
|
|
docker pull forgejo.sivic.me/kevinsivic/ratemyclient:latest
|
|
```
|
|
|
|
### Deploy with the built image:
|
|
|
|
Update your docker-compose.yml to use the registry image:
|
|
```yaml
|
|
services:
|
|
web:
|
|
image: forgejo.sivic.me/kevinsivic/ratemyclient:latest
|
|
# Remove 'build: .' line
|
|
```
|
|
|
|
### Manual Trigger:
|
|
|
|
You can also trigger builds manually from:
|
|
Repository → Actions → Build and Push Docker Image → Run workflow
|