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..34f8390fa9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -87,18 +87,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 +118,9 @@ 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 - name: Download version uses: actions/download-artifact@v2 with: @@ -136,6 +134,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: @@ -145,14 +150,14 @@ jobs: # get tag info for versioning mv _version.py monai/ # version checks - target="\"version\": \"$RELEASE_VERSION\"" - echo $target - local=`grep "\"version\"" monai/_version.py - echo $local - if [ "$local" = "$target" ]; then + 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