Compare commits
15 Commits
0.1.1
...
9267c98156
| Author | SHA1 | Date | |
|---|---|---|---|
| 9267c98156 | |||
| 9d691c5ff6 | |||
| 0c7dffa047 | |||
| aec2f05b00 | |||
| 3d856909c6 | |||
| eb740236d7 | |||
| a2a23a8393 | |||
| 4a78aabfdb | |||
| 5e33afb807 | |||
| c1a7ffd9e8 | |||
| b528097b00 | |||
| 035811115e | |||
| f1ddee1b6e | |||
| 1b0631d4e8 | |||
| 6192b18a49 |
@@ -1,52 +0,0 @@
|
|||||||
name: Docker Image CI
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- "main"
|
|
||||||
tags:
|
|
||||||
- "*" # This triggers the workflow on any tag push
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-and-push-image:
|
|
||||||
runs-on: prodesk
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v3
|
|
||||||
|
|
||||||
- name: Log in to the Container registry
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
|
||||||
registry: gitea.calahilstudios.com
|
|
||||||
username: ${{ secrets.REGISTRY_USER }}
|
|
||||||
password: ${{ secrets.REGISTRY_TOKEN }}
|
|
||||||
|
|
||||||
- name: Prepare tags
|
|
||||||
id: prepare_tags
|
|
||||||
run: |
|
|
||||||
# The image reference for your Gitea registry
|
|
||||||
IMAGE_REF=gitea.calahilstudios.com/calahil/backupbot
|
|
||||||
|
|
||||||
# The main tags: latest and commit SHA
|
|
||||||
TAGS="${IMAGE_REF}:latest,${IMAGE_REF}:${{ gitea.sha }}"
|
|
||||||
|
|
||||||
# If the event is a tag push, add the git tag as a tag
|
|
||||||
if [[ "${{ gitea.ref_type }}" == "tag" ]]; then
|
|
||||||
GIT_TAG_NAME=$(basename "${{ gitea.ref }}")
|
|
||||||
TAGS="${TAGS},${IMAGE_REF}:${GIT_TAG_NAME}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Set the tags as a step output
|
|
||||||
echo "DOCKER_TAGS=${TAGS}" >> $GITEA_ENV
|
|
||||||
|
|
||||||
- name: Build and push Docker image
|
|
||||||
uses: docker/build-push-action@v6
|
|
||||||
with:
|
|
||||||
context: .
|
|
||||||
file: ./Dockerfile
|
|
||||||
push: true
|
|
||||||
tags: ${{ steps.prepare_tags.outputs.DOCKER_TAGS }}
|
|
||||||
77
.github/workflows/build.yml
vendored
Normal file
77
.github/workflows/build.yml
vendored
Normal file
@@ -0,0 +1,77 @@
|
|||||||
|
name: Build and Push Docker Image
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
tags:
|
||||||
|
- "v*"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
|
# 🧠 Login to Docker Hub
|
||||||
|
- name: Login to Docker Hub
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: docker.io
|
||||||
|
username: ${{ github.actor }}
|
||||||
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
|
# 🧠 Login to GitHub Container Registry
|
||||||
|
- name: Login to GHCR
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: ghcr.io
|
||||||
|
username: ${{ github.actor }}
|
||||||
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
# 🧠 Login to Gitea
|
||||||
|
- name: Login to Gitea
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: gitea.calahilstudios.com
|
||||||
|
username: ${{ github.actor }}
|
||||||
|
password: ${{ secrets.GITEA_TOKEN }}
|
||||||
|
|
||||||
|
- name: Debug GitHub context
|
||||||
|
run: |
|
||||||
|
echo "Owner: ${{ github.repository_owner }}"
|
||||||
|
echo "Repo: ${{ github.event.repository.name }}"
|
||||||
|
echo "Full repo: ${{ github.repository }}"
|
||||||
|
|
||||||
|
- name: Docker metadata
|
||||||
|
id: meta
|
||||||
|
uses: docker/metadata-action@v5
|
||||||
|
with:
|
||||||
|
images: |
|
||||||
|
ghcr.io/${{ github.repository }}
|
||||||
|
gitea.calahilstudios.com/${{ github.repository }}
|
||||||
|
${{ github.repository }}
|
||||||
|
tags: |
|
||||||
|
# Always include short SHA
|
||||||
|
type=sha,format=short
|
||||||
|
|
||||||
|
# Include latest if on default branch (usually 'main' or 'develop')
|
||||||
|
type=raw,value=latest,enable={{is_default_branch}}
|
||||||
|
|
||||||
|
# If this is a semver tag (vX.X.X), add full + minor version tags
|
||||||
|
type=semver,pattern={{version}}
|
||||||
|
type=semver,pattern={{major}}.{{minor}}
|
||||||
|
- name: Build and push
|
||||||
|
uses: docker/build-push-action@v6
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: ./Dockerfile
|
||||||
|
push: true
|
||||||
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
|
cache-from: type=gha
|
||||||
|
cache-to: type=gha,mode=max
|
||||||
13
README.md
13
README.md
@@ -1,13 +1,12 @@
|
|||||||
# BackupBot 🤖
|
# BackupBot 🤖
|
||||||
|
|
||||||
[](https://www.gnu.org/licenses/agpl-3.0)
|
|
||||||
[](https://www.docker.com/)
|
|
||||||
[](https://gitea.calahilstudios.com)
|
|
||||||

|
|
||||||

|
|
||||||
|
|
||||||
[](https://hub.docker.com/r/linuxserver/duplicati)
|

|
||||||
[](https://hub.docker.com/r/linuxserver/duplicati)
|

|
||||||
|

|
||||||
|

|
||||||
|

|
||||||
|
|
||||||
|
|
||||||
> **Automated Docker backup system for PostgreSQL databases and application configurations with Duplicati integration**
|
> **Automated Docker backup system for PostgreSQL databases and application configurations with Duplicati integration**
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user