-
Notifications
You must be signed in to change notification settings - Fork 14
41 lines (40 loc) · 1.57 KB
/
docker_build_and_push.yaml
File metadata and controls
41 lines (40 loc) · 1.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: Docker Build and Push
on:
push:
branches:
- main
env:
ECR_REGISTRY: "709825985650.dkr.ecr.us-east-1.amazonaws.com/launchdarkly/mcp"
jobs:
build_push_image:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: zvonimirsun/read-package-version-actions@v2
id: get-semver
- uses: aws-actions/configure-aws-credentials@v4
with:
audience: "https://github.com/launchdarkly"
role-to-assume: "arn:aws:iam::011970158519:role/mcp-server-ecr-publisher"
role-session-name: "McpServerPublish"
aws-region: "us-east-1"
- uses: aws-actions/amazon-ecr-login@v2
with:
registries: "709825985650"
- uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
- uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.6.0
- uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
with:
context: .
file: Dockerfile
platforms: linux/amd64,linux/arm64
tags: |
${{ format('{0}:{1}', env.ECR_REGISTRY, steps.get-semver.outputs.version) }}
labels: |
org.opencontainers.image.title="mcp-server"
org.opencontainers.image.description="LaunchDarkly MCP Server"
org.opencontainers.image.version=${{ steps.get-semver.outputs.version }}
push: ${{ github.ref == 'refs/heads/main' }}