From d5a9330c79c4bc05a6efa2e371a2c5772d05ee4f Mon Sep 17 00:00:00 2001 From: defiQUG Date: Fri, 28 Aug 2026 20:04:40 -0700 Subject: [PATCH] Fix portal deployment image and publish workflow --- .github/workflows/portal-publish.yml | 54 ++++++++++++++++++++ gitops/apps/portal/manifests/deployment.yaml | 3 +- 2 files changed, 55 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/portal-publish.yml diff --git a/.github/workflows/portal-publish.yml b/.github/workflows/portal-publish.yml new file mode 100644 index 0000000..117459e --- /dev/null +++ b/.github/workflows/portal-publish.yml @@ -0,0 +1,54 @@ +name: Portal Publish + +on: + push: + branches: [main, develop] + paths: + - 'portal/**' + - '.github/workflows/portal-publish.yml' + - 'gitops/apps/portal/manifests/deployment.yaml' + workflow_dispatch: + +permissions: + contents: read + packages: write + +jobs: + publish: + name: Build and Publish Portal Image + runs-on: ubuntu-latest + defaults: + run: + working-directory: ./portal + steps: + - uses: actions/checkout@v4 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Log in to GHCR + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Extract image metadata + id: meta + uses: docker/metadata-action@v5 + with: + images: ghcr.io/sankofa/portal + tags: | + type=raw,value=latest,enable={{is_default_branch}} + type=sha,prefix= + + - name: Build and push + uses: docker/build-push-action@v5 + with: + context: ./portal + file: ./portal/Dockerfile + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + cache-from: type=gha + cache-to: type=gha,mode=max diff --git a/gitops/apps/portal/manifests/deployment.yaml b/gitops/apps/portal/manifests/deployment.yaml index 5cca469..f75994e 100644 --- a/gitops/apps/portal/manifests/deployment.yaml +++ b/gitops/apps/portal/manifests/deployment.yaml @@ -17,7 +17,7 @@ spec: spec: containers: - name: portal - image: yourregistry/portal:latest + image: ghcr.io/sankofa/portal:latest ports: - containerPort: 3000 name: http @@ -110,4 +110,3 @@ spec: name: portal port: number: 80 -