Skip to content

fix(org-lens): correct CSV escape and employee filter docs #3521

fix(org-lens): correct CSV escape and employee filter docs

fix(org-lens): correct CSV escape and employee filter docs #3521

# Copyright The Linux Foundation and each contributor to LFX.
# SPDX-License-Identifier: MIT
---
name: Docker Build - Feature Branch
on:
push:
branches:
- 'feat/**'
workflow_dispatch:
concurrency:
group: feat-deploy-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
packages: write
deployments: write
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build-and-push:
if: false
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Compute branch slug
id: slug
env:
REF_NAME: ${{ github.ref_name }}
run: |
# Strip feat/ prefix, lowercase, replace non-alphanumeric with -, truncate to 40
# Strip leading/trailing dashes after sanitization
SLUG=$(echo "$REF_NAME" \
| sed 's|^feat/||' \
| tr '[:upper:]' '[:lower:]' \
| sed 's/[^a-z0-9]/-/g' \
| sed 's/^-\+//;s/-\+$//' \
| cut -c1-40)
echo "value=${SLUG}" >> "$GITHUB_OUTPUT"
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=raw,value=feat-${{ steps.slug.outputs.value }}
labels: |
org.opencontainers.image.title=LFX One UI
org.opencontainers.image.description=Linux Foundation LFX One UI application
org.opencontainers.image.vendor=The Linux Foundation
org.opencontainers.image.licenses=MIT
org.opencontainers.image.documentation=https://github.com/${{ github.repository }}/blob/main/README.md
org.opencontainers.image.source=https://github.com/${{ github.repository }}
com.github.actions.run_id=${{ github.run_id }}
com.github.actions.run_number=${{ github.run_number }}
com.github.actions.workflow=${{ github.workflow }}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: |
BUILD_ENV=development
- name: Post preview URL to step summary
env:
SLUG: ${{ steps.slug.outputs.value }}
run: |
PREVIEW_URL="https://ui-feat-${SLUG}.dev.v2.cluster.linuxfound.info"
echo "### Branch Preview" >> "$GITHUB_STEP_SUMMARY"
echo "**URL:** ${PREVIEW_URL}" >> "$GITHUB_STEP_SUMMARY"
echo "_Deployment may take 2–3 minutes to become healthy._" >> "$GITHUB_STEP_SUMMARY"
- name: Create GitHub Deployment
uses: actions/github-script@v7
env:
SLUG: ${{ steps.slug.outputs.value }}
REF_NAME: ${{ github.ref_name }}
with:
script: |
const slug = process.env.SLUG;
const refName = process.env.REF_NAME;
const environmentUrl = `https://ui-feat-${slug}.dev.v2.cluster.linuxfound.info`;
const deployment = await github.rest.repos.createDeployment({
owner: context.repo.owner,
repo: context.repo.repo,
ref: refName,
environment: 'branch-preview',
description: `Branch preview for ${slug}`,
transient_environment: true,
auto_merge: false,
required_contexts: [],
});
await github.rest.repos.createDeploymentStatus({
owner: context.repo.owner,
repo: context.repo.repo,
deployment_id: deployment.data.id,
state: 'in_progress',
environment_url: environmentUrl,
description: 'Image built, awaiting ArgoCD sync',
log_url: `https://github.com/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}`,
});
core.info(`Created deployment for ${refName} at ${environmentUrl}`);