FEAT(ci): migrate to gitea actions

- Migrate workflows to Gitea Actions
- Configure container registry push
This commit is contained in:
2025-12-11 19:59:26 +09:00
parent 4de90ec898
commit 5bce035df6

View File

@@ -8,8 +8,8 @@ on:
workflow_dispatch:
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
REGISTRY: gitea0213.kro.kr
IMAGE_NAME: ${{ gitea.repository }}
jobs:
build-and-push:
@@ -29,17 +29,17 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to GitHub Container Registry
- name: Log in to Gitea Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
username: ${{ gitea.actor }}
password: ${{ secrets.GITEA_TOKEN }}
- name: Lowercase repository name
id: lowercase
run: |
echo "repo=$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_OUTPUT
echo "repo=$(echo ${{ gitea.repository }} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_OUTPUT
- name: Extract metadata (tags, labels)
id: meta
@@ -77,10 +77,10 @@ jobs:
echo "---"
# Get commit SHA (full 40 characters)
COMMIT_SHA="${{ github.sha }}"
COMMIT_SHA="${{ gitea.sha }}"
# Get current branch name
BRANCH_NAME="${{ github.ref_name }}"
BRANCH_NAME="${{ gitea.ref_name }}"
echo "Branch: $BRANCH_NAME"
# Method 1: Extract the full SHA tag from docker/metadata-action output
@@ -111,10 +111,10 @@ jobs:
- name: Update kustomization with new image tag
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "gitea-actions[bot]"
git config --global user.email "gitea-actions[bot]@users.noreply.gitea.com"
# Validate that SHA_TAG is not empty
SHA_TAG="${{ steps.extract-tag.outputs.sha-tag }}"
@@ -124,7 +124,7 @@ jobs:
fi
# Determine overlay based on branch
BRANCH_NAME="${{ github.ref_name }}"
BRANCH_NAME="${{ gitea.ref_name }}"
if [ "$BRANCH_NAME" = "main" ]; then
OVERLAY="prod"
elif [ "$BRANCH_NAME" = "develop" ]; then