@@ -8,12 +8,12 @@ permissions:
8
8
contents : read
9
9
issues : write
10
10
jobs :
11
- build_images :
12
- name : Build and publish docker image
11
+ properties :
12
+ name : Set properties
13
13
runs-on : ubuntu-latest
14
- env :
15
- IMAGE_REPOSITORY : docker.io/mongodb/apix_test
16
- TAG_PREFIX : mongodb-mcp-server-
14
+ outputs :
15
+ date : ${{ steps.set-properties.outputs.DATE }}
16
+ version : ${{ steps.set-properties.outputs.VERSION }}
17
17
steps :
18
18
- uses : GitHubSecurityLab/actions-permissions/monitor@v1
19
19
with :
27
27
VERSION=$(npm pkg get version | tr -d '"')
28
28
echo "DATE=${DATE}" >> "$GITHUB_OUTPUT"
29
29
echo "VERSION=${VERSION}" >> "$GITHUB_OUTPUT"
30
+ push :
31
+ name : Build and publish docker image
32
+ runs-on : ubuntu-latest
33
+ needs : properties
34
+ env :
35
+ IMAGE_REPOSITORY : docker.io/mongodb/apix_test
36
+ TAG_PREFIX : mongodb-mcp-server-
37
+ steps :
38
+ - uses : GitHubSecurityLab/actions-permissions/monitor@v1
39
+ with :
40
+ config : ${{ vars.PERMISSIONS_CONFIG }}
41
+ - name : Check out code
42
+ uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
43
+ with :
44
+ ref : v${{ needs.properties.outputs.version }}
30
45
- name : Set up Docker Buildx
31
46
uses : docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2
32
47
- name : Login to Docker Hub
@@ -40,14 +55,14 @@ jobs:
40
55
context : .
41
56
platforms : linux/amd64,linux/arm64
42
57
# TODO: add latest tag
43
- tags : ${{ env.IMAGE_REPOSITORY }}:${{ env.TAG_PREFIX }}${{ steps.set- properties.outputs.VERSION }}, ${{ env.IMAGE_REPOSITORY }}:${{ env.TAG_PREFIX }}${{ steps.set- properties.outputs.VERSION }}-${{ steps.set- properties.outputs.DATE }}
58
+ tags : ${{ env.IMAGE_REPOSITORY }}:${{ env.TAG_PREFIX }}${{ needs. properties.outputs.version }}, ${{ env.IMAGE_REPOSITORY }}:${{ env.TAG_PREFIX }}${{ needs. properties.outputs.version }}-${{ needs. properties.outputs.date }}
44
59
file : Dockerfile
45
60
push : true
46
61
# - name: Create Issue
47
62
# if: ${{ failure() }}
48
63
# uses: imjohnbo/issue-bot@572eed14422c4d6ca37e870f97e7da209422f5bd
49
64
# with:
50
65
# labels: failed-release
51
- # title: Release Failure for Docker Image ${{ env.TAG_PREFIX }}${{ steps.set- properties.outputs.VERSION }}-${{ steps.set- properties.outputs.DATE }}
66
+ # title: Release Failure for Docker Image ${{ env.TAG_PREFIX }}${{ needs. properties.outputs.version }}-${{ needs. properties.outputs.date }}
52
67
# body: See https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
53
68
# TODO: enable before merging
0 commit comments