mirror of
https://github.com/Dictionarry-Hub/profilarr.git
synced 2026-01-22 10:51:02 +01:00
chore: docker build workflows
This commit is contained in:
81
.github/workflows/docker.yml
vendored
Normal file
81
.github/workflows/docker.yml
vendored
Normal file
@@ -0,0 +1,81 @@
|
||||
name: Docker
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- v2
|
||||
tags:
|
||||
- 'v*'
|
||||
|
||||
env:
|
||||
REGISTRY: ghcr.io
|
||||
IMAGE_BASE: ghcr.io/dictionarry-hub
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
attestations: write
|
||||
id-token: write
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- image: profilarr
|
||||
dockerfile: Dockerfile
|
||||
- image: profilarr-parser
|
||||
dockerfile: Dockerfile.parser
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
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: Log in to GHCR
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Extract metadata
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: ${{ env.IMAGE_BASE }}/${{ matrix.image }}
|
||||
tags: |
|
||||
# Branch push -> develop
|
||||
type=raw,value=develop,enable=${{ github.ref == 'refs/heads/v2' }}
|
||||
# Beta tag -> beta + version
|
||||
type=raw,value=beta,enable=${{ startsWith(github.ref, 'refs/tags/v') && contains(github.ref, '-beta') }}
|
||||
type=semver,pattern={{version}},enable=${{ startsWith(github.ref, 'refs/tags/v') && contains(github.ref, '-beta') }}
|
||||
# Stable tag -> latest + version
|
||||
type=raw,value=latest,enable=${{ startsWith(github.ref, 'refs/tags/v') && !contains(github.ref, '-beta') }}
|
||||
type=semver,pattern={{version}},enable=${{ startsWith(github.ref, 'refs/tags/v') && !contains(github.ref, '-beta') }}
|
||||
|
||||
- name: Build and push
|
||||
id: push
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
file: ${{ matrix.dockerfile }}
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: true
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
cache-from: type=registry,ref=${{ env.IMAGE_BASE }}/${{ matrix.image }}:buildcache
|
||||
cache-to: type=registry,ref=${{ env.IMAGE_BASE }}/${{ matrix.image }}:buildcache,mode=max
|
||||
|
||||
- name: Generate attestation
|
||||
uses: actions/attest-build-provenance@v2
|
||||
with:
|
||||
subject-name: ${{ env.IMAGE_BASE }}/${{ matrix.image }}
|
||||
subject-digest: ${{ steps.push.outputs.digest }}
|
||||
push-to-registry: true
|
||||
@@ -1,6 +1,6 @@
|
||||
services:
|
||||
profilarr:
|
||||
image: santiagosayshey/profilarr:latest
|
||||
image: ghcr.io/dictionarry-hub/profilarr:latest
|
||||
container_name: profilarr
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
@@ -22,7 +22,7 @@ services:
|
||||
|
||||
# Optional - only needed for CF/QP testing features
|
||||
parser:
|
||||
image: santiagosayshey/profilarr-parser:latest
|
||||
image: ghcr.io/dictionarry-hub/profilarr-parser:latest
|
||||
container_name: profilarr-parser
|
||||
restart: unless-stopped
|
||||
expose:
|
||||
|
||||
118
docs/DEVELOPMENT.md
Normal file
118
docs/DEVELOPMENT.md
Normal file
@@ -0,0 +1,118 @@
|
||||
# Development
|
||||
|
||||
## Branching Strategy
|
||||
|
||||
Profilarr uses **GitHub Flow** with **Release Channels**.
|
||||
|
||||
- All development happens on `main`
|
||||
- Feature branches for isolated work
|
||||
- Tags trigger Docker image builds
|
||||
|
||||
## Release Channels
|
||||
|
||||
| Channel | Docker Tag | Trigger | Stability |
|
||||
| ------- | ---------- | ------------------- | --------- |
|
||||
| Develop | `:develop` | Every push to main | Unstable |
|
||||
| Beta | `:beta` | `v*-beta.*` tag | Testing |
|
||||
| Stable | `:latest` | `v*` tag (no -beta) | Stable |
|
||||
|
||||
Version-specific tags (`:v2.1.0`) are also created for pinning.
|
||||
|
||||
## Development Workflow
|
||||
|
||||
### Daily Work
|
||||
|
||||
```bash
|
||||
git add .
|
||||
git commit -m "feat: description"
|
||||
git push
|
||||
```
|
||||
|
||||
Pushes to `main` automatically build the `:develop` image.
|
||||
|
||||
### Feature Branches
|
||||
|
||||
For larger features, use a branch:
|
||||
|
||||
```bash
|
||||
git checkout -b feature/name
|
||||
# work...
|
||||
git checkout main
|
||||
git merge feature/name
|
||||
git branch -d feature/name
|
||||
```
|
||||
|
||||
## Release Process
|
||||
|
||||
### 1. Beta Release
|
||||
|
||||
```bash
|
||||
git tag v2.1.0-beta.1
|
||||
git push --tags
|
||||
```
|
||||
|
||||
### 2. Beta Fixes
|
||||
|
||||
```bash
|
||||
git commit -m "fix: issue from beta"
|
||||
git push
|
||||
git tag v2.1.0-beta.2
|
||||
git push --tags
|
||||
```
|
||||
|
||||
### 3. Stable Release
|
||||
|
||||
After minimum 1 week in beta with no major issues:
|
||||
|
||||
```bash
|
||||
git tag v2.1.0
|
||||
git push --tags
|
||||
```
|
||||
|
||||
## Release Timing
|
||||
|
||||
**Stable Releases**: Wednesday
|
||||
|
||||
- Beta releases can be tagged any day. Must be in beta for at least a week
|
||||
before tagged as stable
|
||||
|
||||
## Versioning
|
||||
|
||||
[Semantic Versioning](https://semver.org/):
|
||||
|
||||
```
|
||||
v2.1.0-beta.1
|
||||
│ │ │ └──── Pre-release identifier
|
||||
│ │ └───────── Patch (bug fixes)
|
||||
│ └─────────── Minor (new features, backwards compatible)
|
||||
└───────────── Major (breaking changes)
|
||||
```
|
||||
|
||||
| Change | Bump |
|
||||
| --------------- | ------------------- |
|
||||
| Bug fix | `v2.1.0` → `v2.1.1` |
|
||||
| New feature | `v2.1.0` → `v2.2.0` |
|
||||
| Breaking change | `v2.1.0` → `v3.0.0` |
|
||||
|
||||
## Commit Messages
|
||||
|
||||
Use [Conventional Commits](https://www.conventionalcommits.org/):
|
||||
|
||||
```
|
||||
feat: add new feature
|
||||
fix: resolve bug
|
||||
docs: update documentation
|
||||
refactor: restructure code
|
||||
chore: maintenance tasks
|
||||
```
|
||||
|
||||
## Hotfixes
|
||||
|
||||
For critical bugs in stable:
|
||||
|
||||
```bash
|
||||
git commit -m "fix: critical issue"
|
||||
git push
|
||||
git tag v2.1.1
|
||||
git push --tags
|
||||
```
|
||||
Reference in New Issue
Block a user