CHORE(ci): migrate from GHCR to Zot registry
- Change registry from ghcr.io to zot0213.kro.kr - Update secrets to ZOT_USERNAME and ZOT_PASSWORD - Simplify image name to docusaurus
This commit is contained in:
20
.github/workflows/build.yml
vendored
20
.github/workflows/build.yml
vendored
@@ -8,8 +8,8 @@ on:
|
|||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
env:
|
env:
|
||||||
REGISTRY: ghcr.io
|
REGISTRY: zot0213.kro.kr
|
||||||
IMAGE_NAME: ${{ github.repository }}
|
IMAGE_NAME: docusaurus
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-push:
|
build-and-push:
|
||||||
@@ -29,23 +29,18 @@ 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 Zot Registry
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
registry: ${{ env.REGISTRY }}
|
registry: ${{ env.REGISTRY }}
|
||||||
username: ${{ github.actor }}
|
username: ${{ secrets.ZOT_USERNAME }}
|
||||||
password: ${{ secrets.CR_PAT }}
|
password: ${{ secrets.ZOT_PASSWORD }}
|
||||||
|
|
||||||
- name: Lowercase repository name
|
|
||||||
id: lowercase
|
|
||||||
run: |
|
|
||||||
echo "repo=$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- name: Extract metadata (tags, labels)
|
- name: Extract metadata (tags, labels)
|
||||||
id: meta
|
id: meta
|
||||||
uses: docker/metadata-action@v5
|
uses: docker/metadata-action@v5
|
||||||
with:
|
with:
|
||||||
images: ${{ env.REGISTRY }}/${{ steps.lowercase.outputs.repo }}
|
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||||
tags: |
|
tags: |
|
||||||
type=sha,prefix=sha-,format=long
|
type=sha,prefix=sha-,format=long
|
||||||
type=raw,value=latest,enable={{is_default_branch}}
|
type=raw,value=latest,enable={{is_default_branch}}
|
||||||
@@ -58,9 +53,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
file: ./Dockerfile
|
file: ./Dockerfile
|
||||||
build-contexts: |
|
|
||||||
docusaurus=./docusaurus
|
|
||||||
nginx=./nginx
|
|
||||||
push: true
|
push: true
|
||||||
platforms: linux/arm64
|
platforms: linux/arm64
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
|
|||||||
Reference in New Issue
Block a user