6 Commits

Author SHA1 Message Date
c1a7ffd9e8 try 4
All checks were successful
Build and Push Docker Image / build (push) Successful in 45s
2025-10-23 17:24:45 -07:00
b528097b00 step4
Some checks failed
Build and Push Docker Image / build (push) Failing after 8s
2025-10-23 17:16:43 -07:00
035811115e try 3
Some checks failed
Build and Push Docker Image / build (push) Failing after 8s
2025-10-23 17:08:05 -07:00
f1ddee1b6e step2
Some checks failed
Build and Push Docker Image / build (push) Failing after 8s
2025-10-23 16:02:40 -07:00
1b0631d4e8 test 2
Some checks failed
Build and Push Docker Image / build (push) Failing after 8s
2025-10-23 15:43:10 -07:00
6192b18a49 learning something new
Some checks failed
Build and Push Docker Image / build (push) Failing after 8s
2025-10-23 15:27:46 -07:00

View File

@@ -1,16 +1,15 @@
name: Docker Image CI
name: Build and Push Docker Image
on:
push:
branches:
- "main"
- main
tags:
- "*" # This triggers the workflow on any tag push
- "v*"
jobs:
build-and-push-image:
build:
runs-on: prodesk
steps:
- name: Checkout repository
uses: actions/checkout@v4
@@ -18,35 +17,30 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to the Container registry
- name: Log in to Gitea Docker 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
- name: Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: gitea.calahilstudios.com/${{ github.repository_owner }}/${{ github.event.repository.name }}
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=sha
type=raw,value=latest,enable={{is_default_branch}}
# 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
- name: Build and push image
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
push: true
tags: ${{ steps.prepare_tags.outputs.DOCKER_TAGS }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}