From c91b2e65b17c8fbd5c40b62986e45525e2327d69 Mon Sep 17 00:00:00 2001 From: Wenqi Li Date: Tue, 19 Oct 2021 20:12:23 +0100 Subject: [PATCH 1/9] temp tests Signed-off-by: Wenqi Li --- .github/workflows/docker.yml | 1 - .github/workflows/release.yml | 17 +++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 5361017934..7140cd7dd8 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -16,7 +16,6 @@ jobs: versioning_dev: # compute versioning file from python setup.py # upload as artifact - # (also used in release.yml) if: github.repository == 'Project-MONAI/MONAI' runs-on: ubuntu-latest steps: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0214ae4cf6..4f95178a17 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,6 +5,7 @@ on: push: branches: - main + - release-yaml tags: - '*' @@ -87,18 +88,18 @@ jobs: versioning: # compute versioning file from python setup.py # upload as artifact - # (also used in docker.yml) if: github.repository == 'Project-MONAI/MONAI' needs: packaging - container: - image: localhost:5000/local_monai:latest - runs-on: [self-hosted, linux, x64, build_only] + runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 # full history so that we can git describe with: - ref: main fetch-depth: 0 + - name: Set up Python 3.8 + uses: actions/setup-python@v2 + with: + python-version: 3.8 - shell: bash run: | git describe @@ -118,11 +119,11 @@ jobs: release_tag_docker: if: github.repository == 'Project-MONAI/MONAI' needs: versioning - runs-on: [self-hosted, linux, x64, build_only] + runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 with: - ref: main + ref: release-yaml - name: Download version uses: actions/download-artifact@v2 with: @@ -160,5 +161,5 @@ jobs: docker build -t projectmonai/monai:"$RELEASE_VERSION" -f Dockerfile . # distribute with a tag to hub.docker.com echo "${{ secrets.DOCKER_PW }}" | docker login -u projectmonai --password-stdin - docker push projectmonai/monai:"$RELEASE_VERSION" + # docker push projectmonai/monai:"$RELEASE_VERSION" docker logout From 22c538b2f199b3cff998fb2be0d55f2e82f72617 Mon Sep 17 00:00:00 2001 From: Wenqi Li Date: Tue, 19 Oct 2021 20:16:01 +0100 Subject: [PATCH 2/9] adds doker Signed-off-by: Wenqi Li --- .github/workflows/release.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4f95178a17..5e45f01104 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -137,6 +137,13 @@ jobs: run: | echo "$RELEASE_VERSION" cat _version.py + - if: startsWith(github.ref, 'refs/tags/') + name: Install Latest Docker + run: | + curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - + sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" + sudo apt-get update + sudo apt-get install docker-ce - if: startsWith(github.ref, 'refs/tags/') name: build with the tag env: From c126efb89d2f1e88bfe3feea5a8beca323c26b1e Mon Sep 17 00:00:00 2001 From: Wenqi Li Date: Tue, 19 Oct 2021 20:18:36 +0100 Subject: [PATCH 3/9] temp tests Signed-off-by: Wenqi Li --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5e45f01104..89ee05102f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -89,7 +89,7 @@ jobs: # compute versioning file from python setup.py # upload as artifact if: github.repository == 'Project-MONAI/MONAI' - needs: packaging + # needs: packaging runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 From 1ac866b31e6977f6c34d53c3eb06fe8b89e3225d Mon Sep 17 00:00:00 2001 From: Wenqi Li Date: Tue, 19 Oct 2021 20:26:48 +0100 Subject: [PATCH 4/9] update Signed-off-by: Wenqi Li --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 89ee05102f..12abf1fa4c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -155,7 +155,7 @@ jobs: # version checks target="\"version\": \"$RELEASE_VERSION\"" echo $target - local=`grep "\"version\"" monai/_version.py + local=`grep "\"version\"" monai/_version.py` echo $local if [ "$local" = "$target" ]; then echo "matched version string" From 7833bba2227219d37f0a3f3c13edd2c6d77110f1 Mon Sep 17 00:00:00 2001 From: Wenqi Li Date: Tue, 19 Oct 2021 20:36:27 +0100 Subject: [PATCH 5/9] update Signed-off-by: Wenqi Li --- .github/workflows/release.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 12abf1fa4c..d9ada7561a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -122,8 +122,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - with: - ref: release-yaml - name: Download version uses: actions/download-artifact@v2 with: @@ -153,7 +151,7 @@ jobs: # get tag info for versioning mv _version.py monai/ # version checks - target="\"version\": \"$RELEASE_VERSION\"" + target="\"version\"\:\ \"$RELEASE_VERSION\"" echo $target local=`grep "\"version\"" monai/_version.py` echo $local From c6d4792a55db51a1ec16149bce22d87cdd6beffa Mon Sep 17 00:00:00 2001 From: Wenqi Li Date: Tue, 19 Oct 2021 20:42:21 +0100 Subject: [PATCH 6/9] check branches Signed-off-by: Wenqi Li --- .github/workflows/release.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d9ada7561a..e5d42b13d2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -151,14 +151,14 @@ jobs: # get tag info for versioning mv _version.py monai/ # version checks - target="\"version\"\:\ \"$RELEASE_VERSION\"" - echo $target + target="\"version\": \"$RELEASE_VERSION\"" local=`grep "\"version\"" monai/_version.py` + echo $target echo $local if [ "$local" = "$target" ]; then echo "matched version string" else - echo "unmatched version string, please check the main branch" + echo "unmatched version string, please check the tagging branch." exit 1 fi # remove flake package as it is not needed on hub.docker.com From 0e4ecfcc4bf6c72a0c8ab1d4e7c7199de97db86b Mon Sep 17 00:00:00 2001 From: Wenqi Li Date: Tue, 19 Oct 2021 20:46:55 +0100 Subject: [PATCH 7/9] temp tests Signed-off-by: Wenqi Li --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e5d42b13d2..da2312eb34 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -155,7 +155,7 @@ jobs: local=`grep "\"version\"" monai/_version.py` echo $target echo $local - if [ "$local" = "$target" ]; then + if [[ "$local" == "$target" ]]; then echo "matched version string" else echo "unmatched version string, please check the tagging branch." From 8ea83243e77eb4b69344e98d478de0d494409992 Mon Sep 17 00:00:00 2001 From: Wenqi Li Date: Tue, 19 Oct 2021 20:57:14 +0100 Subject: [PATCH 8/9] fixes cmp Signed-off-by: Wenqi Li --- .github/workflows/release.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index da2312eb34..c71b75cb9e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -136,7 +136,7 @@ jobs: echo "$RELEASE_VERSION" cat _version.py - if: startsWith(github.ref, 'refs/tags/') - name: Install Latest Docker + name: Install latest docker run: | curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" @@ -151,10 +151,10 @@ jobs: # get tag info for versioning mv _version.py monai/ # version checks - target="\"version\": \"$RELEASE_VERSION\"" + target=" \"version\": \"$RELEASE_VERSION\"" local=`grep "\"version\"" monai/_version.py` - echo $target - echo $local + echo "$target" + echo "$local" if [[ "$local" == "$target" ]]; then echo "matched version string" else From 5791ee214873c7610b3860e12880acc3c2fb3bbc Mon Sep 17 00:00:00 2001 From: Wenqi Li Date: Tue, 19 Oct 2021 21:03:24 +0100 Subject: [PATCH 9/9] remove temp tests Signed-off-by: Wenqi Li --- .github/workflows/release.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c71b75cb9e..34f8390fa9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,7 +5,6 @@ on: push: branches: - main - - release-yaml tags: - '*' @@ -89,7 +88,7 @@ jobs: # compute versioning file from python setup.py # upload as artifact if: github.repository == 'Project-MONAI/MONAI' - # needs: packaging + needs: packaging runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -166,5 +165,5 @@ jobs: docker build -t projectmonai/monai:"$RELEASE_VERSION" -f Dockerfile . # distribute with a tag to hub.docker.com echo "${{ secrets.DOCKER_PW }}" | docker login -u projectmonai --password-stdin - # docker push projectmonai/monai:"$RELEASE_VERSION" + docker push projectmonai/monai:"$RELEASE_VERSION" docker logout