feat: migrate Docker registry from direct registry to Harbor
All checks were successful
Build and Deploy / build-and-push (push) Successful in 43s
All checks were successful
Build and Deploy / build-and-push (push) Successful in 43s
This commit reconfigures the CI/CD pipeline to use Harbor as the container registry: - Updated registry endpoint from 10.106.73.119:5000 to harbor.basicstack.de - Added PROJECT variable (basicstack) to organize images in Harbor - Updated image paths to include Harbor project: harbor.basicstack.de/basicstack/basicstack-web - Changed authentication from 'paperclip' user to 'admin' user for Harbor - Updated Forgejo secret REGISTRY_PASSWORD with Harbor admin credentials - Created 'basicstack' project in Harbor for image storage Images will now be: - Built in CI/CD - Pushed to harbor.basicstack.de/basicstack/basicstack-web:TAG - Pulled from Harbor for deployment (manifest auto-updated by workflow) Resolves: DEV-338 Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
parent
55d454adc8
commit
fecd6a23b8
1 changed files with 6 additions and 5 deletions
|
|
@ -6,7 +6,8 @@ on:
|
||||||
- main
|
- main
|
||||||
|
|
||||||
env:
|
env:
|
||||||
REGISTRY: 10.106.73.119:5000
|
REGISTRY: harbor.basicstack.de
|
||||||
|
PROJECT: basicstack
|
||||||
IMAGE_NAME: basicstack-web
|
IMAGE_NAME: basicstack-web
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
@ -25,8 +26,8 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
TAG=$(date +%Y%m%d-%H%M%S)-${GITHUB_SHA:0:7}
|
TAG=$(date +%Y%m%d-%H%M%S)-${GITHUB_SHA:0:7}
|
||||||
echo "TAG=${TAG}" >> $GITHUB_OUTPUT
|
echo "TAG=${TAG}" >> $GITHUB_OUTPUT
|
||||||
echo "FULL_IMAGE=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${TAG}" >> $GITHUB_OUTPUT
|
echo "FULL_IMAGE=${{ env.REGISTRY }}/${{ env.PROJECT }}/${{ env.IMAGE_NAME }}:${TAG}" >> $GITHUB_OUTPUT
|
||||||
echo "LATEST_IMAGE=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest" >> $GITHUB_OUTPUT
|
echo "LATEST_IMAGE=${{ env.REGISTRY }}/${{ env.PROJECT }}/${{ env.IMAGE_NAME }}:latest" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Build Docker image
|
- name: Build Docker image
|
||||||
run: |
|
run: |
|
||||||
|
|
@ -35,10 +36,10 @@ jobs:
|
||||||
-t ${{ steps.meta.outputs.LATEST_IMAGE }} \
|
-t ${{ steps.meta.outputs.LATEST_IMAGE }} \
|
||||||
-f Dockerfile .
|
-f Dockerfile .
|
||||||
|
|
||||||
- name: Log in to container registry
|
- name: Log in to Harbor registry
|
||||||
run: |
|
run: |
|
||||||
echo "${{ secrets.REGISTRY_PASSWORD }}" | docker login ${{ env.REGISTRY }} \
|
echo "${{ secrets.REGISTRY_PASSWORD }}" | docker login ${{ env.REGISTRY }} \
|
||||||
-u paperclip --password-stdin
|
-u admin --password-stdin
|
||||||
|
|
||||||
- name: Push Docker image
|
- name: Push Docker image
|
||||||
run: |
|
run: |
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue