Skip to content

Commit 907114c

Browse files
test: action go
Signed-off-by: Scott Schreckengaust <[email protected]>
1 parent e393b33 commit 907114c

File tree

3 files changed

+34
-26
lines changed

3 files changed

+34
-26
lines changed

.github/actions/build-and-push-container-image/action.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,12 @@ outputs:
4141

4242
runs:
4343
using: "composite"
44+
strategy:
45+
fail-fast: false
46+
matrix:
47+
platform:
48+
- linux/amd64
49+
- linux/arm64
4450
steps:
4551
- id: get-version
4652
name: Workflow ${{ github.workflow }} Job ${{ github.job }} Action ${{ github.action }} Number ${{ github.run_number }} Attempt ${{ github.run_attempt }}

.github/workflows/release.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -165,14 +165,11 @@ jobs:
165165
packages-dir: src/${{ matrix.package }}/dist
166166

167167
- name: Build and Publish Image
168-
uses: ./.github/workflows/build-and-push-container-image.yml
168+
uses: .github/actions/build-and-push-container-image
169169
if: hashFiles(src/${{ matrix.package }}/Dockerfile)
170170
with:
171-
secrets: inherit # pragma: allowlist secret
172-
tags: ${{ matrix.package }}
171+
image: ${{ matrix.package }}
173172
version: '' # for now everything is the latest or by sha commit
174-
context: src/${{ matrix.package }}
175-
file: src/${{ matrix.package }}/Dockerfile
176173

177174
publish-npm:
178175
if: github.repository == 'awslabs/mcp' && needs.create-metadata.outputs.npm_packages != '[]' && needs.create-metadata.outputs.npm_packages != ''

.github/workflows/temp-test.yml

Lines changed: 26 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -8,36 +8,41 @@ on:
88
permissions: {}
99

1010
jobs:
11-
go-go-reusable-workflow:
12-
name: go-go ${{ matrix.package }}
13-
# https://github.com/.github/workflows/tree/feature/push-container-images/build-and-push-container-image.yml
14-
uses: awslabs/mcp/.github/workflows/build-and-push-container-image.yml@feature/push-container-images
15-
# uses: .github/workflows/build-and-push-container-image.yml
11+
test-job:
12+
name: Test Job
1613
permissions:
1714
contents: read
1815
packages: write
19-
actions: read
20-
secrets: inherit # pragma: allowlist secret
21-
with:
22-
image: ${{ matrix.package }}
23-
version: ${{ github.run_id }}
16+
runs-on: ubuntu-latest
17+
environment: release
2418
strategy:
2519
fail-fast: false
2620
matrix:
2721
package:
2822
- core-mcp-server
2923
- git-repo-research-mcp-server
3024

31-
next-jobs:
32-
name: Next Job
33-
permissions:
34-
contents: read
35-
runs-on: ubuntu-latest
3625
steps:
37-
- run: |
38-
echo "go"
39-
- uses: awslabs/mcp/.github/actions/build-and-push-container-image@feature/push-container-images
26+
- name: Checkout repository
27+
id: checkout-repository
28+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
29+
30+
- name: Build and Publish ${{ matrix.package }}
31+
id: build-and-publish
32+
uses: .github/actions/build-and-push-container-image
33+
if: hashFiles(format('./src/{0}/Dockerfile', matrix.package))
4034
with:
41-
secrets: inherit
42-
image: 'test-mcp-server'
43-
version: 'TBD'
35+
image: ${{ matrix.package }}
36+
version: ${{ github.sha }}
37+
38+
- name: Display Image Version ${{ matrix.package }}
39+
id: display-image-version
40+
if: success()
41+
run: |
42+
echo "version: ${VERSION}"
43+
env:
44+
VERSION: ${{ steps.build-and-publish.outputs.version }}
45+
46+
- name: Continue
47+
run: |
48+
echo "continue"

0 commit comments

Comments
 (0)