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