@@ -8,12 +8,12 @@ permissions:
88 contents : read
99 issues : write
1010jobs :
11- build_images :
12- name : Build and publish docker image
11+ properties :
12+ name : Set properties
1313 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 }}
1717 steps :
1818 - uses : GitHubSecurityLab/actions-permissions/monitor@v1
1919 with :
2727 VERSION=$(npm pkg get version | tr -d '"')
2828 echo "DATE=${DATE}" >> "$GITHUB_OUTPUT"
2929 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 }}
3045 - name : Set up Docker Buildx
3146 uses : docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2
3247 - name : Login to Docker Hub
@@ -40,14 +55,14 @@ jobs:
4055 context : .
4156 platforms : linux/amd64,linux/arm64
4257 # 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 }}
4459 file : Dockerfile
4560 push : true
4661 # - name: Create Issue
4762 # if: ${{ failure() }}
4863 # uses: imjohnbo/issue-bot@572eed14422c4d6ca37e870f97e7da209422f5bd
4964 # with:
5065 # 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 }}
5267 # body: See https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
5368 # TODO: enable before merging
0 commit comments