From 754ff5d9a9fa0cd336321a7f0115ddc5f3481bd3 Mon Sep 17 00:00:00 2001 From: Alex Lebens Date: Fri, 14 Mar 2025 22:37:03 -0500 Subject: [PATCH] add harbor --- .gitea/workflows/release-image-harbor.yml | 58 ++++++++++++----------- 1 file changed, 30 insertions(+), 28 deletions(-) diff --git a/.gitea/workflows/release-image-harbor.yml b/.gitea/workflows/release-image-harbor.yml index 879615b..0eb9ba8 100644 --- a/.gitea/workflows/release-image-harbor.yml +++ b/.gitea/workflows/release-image-harbor.yml @@ -14,6 +14,30 @@ jobs: - name: Checkout uses: actions/checkout@v4 + - name: Create Kubeconfig + run: | + mkdir $HOME/.kube + echo "${{ secrets.KUBECONFIG_BUILDX }}" > $HOME/.kube/config + + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v3 + with: + driver: kubernetes + driver-opts: | + namespace=gitea + qemu.install=true + + - name: Available Platforms + run: echo ${{ steps.buildx.outputs.platforms }} + + - name: Login to Registry + uses: docker/login-action@v3 + with: + registry: ${{ vars.REGISTRY_HOST }} + username: ${{ vars.REGISTRY_USER }} + password: ${{ secrets.REGISTRY_SECRET }} + - name: Extract Metadata id: meta uses: docker/metadata-action@v5 @@ -23,34 +47,12 @@ jobs: type=ref,event=tag images: ${{ vars.REGISTRY_HOST }}/images - - name: Install Podman - run: | - sudo apt-get update - sudo apt-get install -y podman - - - name: Log into Registry - id: log-in - uses: redhat-actions/podman-login@v1 + - name: Build and Push Image + uses: docker/build-push-action@v6 with: - registry: ${{ vars.REGISTRY_HOST }} - username: ${{ vars.REGISTRY_USER }} - password: ${{ secrets.REGISTRY_SECRET }} - - - name: Build Image - id: build-image - uses: redhat-actions/buildah-build@v2 - with: - oci: true - image: ${{ vars.REGISTRY_HOST }}/images + context: . + push: true + platforms: linux/amd64 tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - containerfiles: | - ./Dockerfile - - - name: Push Image - id: push-to-gitea - uses: redhat-actions/push-to-registry@v2 - with: - image: ${{ steps.build-image.outputs.image }} - tags: ${{ steps.build-image.outputs.tags }} - registry: ${{ vars.REGISTRY_HOST }} + file: ./Dockerfile \ No newline at end of file