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