Skip to content

feat(mailing-lists): implement create and edit functionality (#217) #191

feat(mailing-lists): implement create and edit functionality (#217)

feat(mailing-lists): implement create and edit functionality (#217) #191

# Copyright The Linux Foundation and each contributor to LFX.
# SPDX-License-Identifier: MIT
name: Docker Build - Main Branch
on:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: read
id-token: write
packages: write
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: OIDC Auth
uses: aws-actions/configure-aws-credentials@v4
with:
audience: sts.amazonaws.com
role-to-assume: arn:aws:iam::788942260905:role/github-actions-deploy
aws-region: us-west-2
- name: Get LaunchDarkly client ID from AWS Secrets Manager
uses: aws-actions/aws-secretsmanager-get-secrets@v2
with:
secret-ids: |
LAUNCHDARKLY, /cloudops/managed-secrets/launchdarkly/lfx_one/ld_client_id
- name: Set LaunchDarkly client ID environment variable
run: |
LAUNCHDARKLY_CLIENT_ID=$(echo "$LAUNCHDARKLY" | jq -r '.ld_client_id // empty')
if [ -z "$LAUNCHDARKLY_CLIENT_ID" ]; then
echo "❌ LaunchDarkly client ID not found in AWS Secrets Manager"
exit 1
fi
echo "LAUNCHDARKLY_CLIENT_ID=$LAUNCHDARKLY_CLIENT_ID" >> $GITHUB_ENV
- 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=development
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
secret-envs: |
LAUNCHDARKLY_CLIENT_ID=LAUNCHDARKLY_CLIENT_ID