FEAT(ci): add Gitea Actions workflow with ghcr.io
- Add CI/CD workflow for Gitea Actions - Configure ghcr.io registry push
This commit is contained in:
@@ -8,8 +8,9 @@ on:
|
|||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
env:
|
env:
|
||||||
REGISTRY: gitea0213.kro.kr
|
REGISTRY: ghcr.io
|
||||||
IMAGE_NAME: ${{ github.repository }}
|
IMAGE_NAME: ${{ github.repository }}
|
||||||
|
DOCKER_HOST: tcp://172.17.0.1:2375
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-push:
|
build-and-push:
|
||||||
@@ -26,17 +27,14 @@ jobs:
|
|||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Log in to Gitea Container Registry
|
- name: Log in to GitHub Container Registry
|
||||||
uses: docker/login-action@v3
|
run: |
|
||||||
with:
|
echo "${{ secrets.githubregistry }}" | docker login ${{ env.REGISTRY }} -u Mayne0213 --password-stdin
|
||||||
registry: ${{ env.REGISTRY }}
|
|
||||||
username: ${{ github.actor }}
|
|
||||||
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 ${{ github.repository }} | tr '[:upper:]' '[:lower:]' | sed 's/bluemayne/mayne0213/')" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Extract metadata (tags, labels)
|
- name: Extract metadata (tags, labels)
|
||||||
id: meta
|
id: meta
|
||||||
@@ -60,7 +58,7 @@ jobs:
|
|||||||
docker build \
|
docker build \
|
||||||
-t $(echo "$TAGS" | head -n 1) \
|
-t $(echo "$TAGS" | head -n 1) \
|
||||||
-f ./deploy/docker/Dockerfile.prod \
|
-f ./deploy/docker/Dockerfile.prod \
|
||||||
./services/fastapi
|
./services/nextjs
|
||||||
|
|
||||||
# Tag all versions
|
# Tag all versions
|
||||||
FIRST_TAG=$(echo "$TAGS" | head -n 1)
|
FIRST_TAG=$(echo "$TAGS" | head -n 1)
|
||||||
|
|||||||
Reference in New Issue
Block a user