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