diff --git a/.github/workflows/README.md b/.github/workflows/README.md index e4ff271..5ee009c 100644 --- a/.github/workflows/README.md +++ b/.github/workflows/README.md @@ -89,6 +89,6 @@ More Information on python-publish action & Repository Dispatch action can be fo ### Secrets used | Name | | |---|---| -|PYPI_USER |pypi login credentials used in GitHub workflows | -|PYPI_PASSWORD |pypi login credentials used in GitHub workflows | +|PYPI_USER (depreciated) |pypi login credentials used in GitHub workflows | +|PYPI_PASSWORD (depreciated) |pypi login credentials used in GitHub workflows | |MLCOMMONS_REPO_ACCESS |public_repo ACL for request dispatch in GitHub workflows | diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index 3191b11..a0c7a11 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -10,6 +10,8 @@ on: jobs: deploy: runs-on: ubuntu-latest + permissions: + id-token: write steps: - uses: actions/checkout@v2 - name: Set up Python @@ -27,12 +29,10 @@ jobs: - name: Publish uses: pypa/gh-action-pypi-publish@release/v1 with: - user: ${{ secrets.PYPI_USER }} verify_metadata: true skip_existing: true - password: ${{ secrets.PYPI_PASSWORD }} packages_dir: mlcube/dist/ - repository_url: https://upload.pypi.org/legacy/ + repository_url: https://test.pypi.org/legacy/ verbose: true env: LOGLEVEL: DEBUG @@ -45,5 +45,5 @@ jobs: uses: peter-evans/repository-dispatch@v1 with: token: ${{ secrets.MLCOMMONS_REPO_ACCESS }} - repository: mlcommons/mlcube + repository: nathanw-mlc/mlcube event-type: publish-runners diff --git a/.github/workflows/runner-publish.yml b/.github/workflows/runner-publish.yml index 10f1bee..7d74035 100644 --- a/.github/workflows/runner-publish.yml +++ b/.github/workflows/runner-publish.yml @@ -7,37 +7,10 @@ on: repository_dispatch: types: publish-runners -jobs: - ssh_deploy: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: '3.x' - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install setuptools wheel twine - - name: Build distribution - run: | - cd runners/mlcube_ssh - python setup.py sdist bdist_wheel - - name: Publish - uses: pypa/gh-action-pypi-publish@release/v1 - with: - user: ${{ secrets.PYPI_USER }} - verify_metadata: true - skip_existing: true - password: ${{ secrets.PYPI_PASSWORD }} - packages_dir: runners/mlcube_ssh/dist/ - repository_url: https://upload.pypi.org/legacy/ - env: - LOGLEVEL: DEBUG - docker_deploy: runs-on: ubuntu-latest + permissions: + id-token: write steps: - uses: actions/checkout@v2 - name: Set up Python @@ -55,128 +28,10 @@ jobs: - name: Publish uses: pypa/gh-action-pypi-publish@release/v1 with: - user: ${{ secrets.PYPI_USER }} verify_metadata: true skip_existing: true - password: ${{ secrets.PYPI_PASSWORD }} packages_dir: runners/mlcube_docker/dist/ - repository_url: https://upload.pypi.org/legacy/ - verbose: true - env: - LOGLEVEL: DEBUG - - singularity_deploy: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: '3.x' - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install setuptools wheel twine - - name: Build distribution - run: | - cd runners/mlcube_singularity - python setup.py sdist bdist_wheel - - name: Publish - uses: pypa/gh-action-pypi-publish@release/v1 - with: - user: ${{ secrets.PYPI_USER }} - verify_metadata: true - skip_existing: true - password: ${{ secrets.PYPI_PASSWORD }} - packages_dir: runners/mlcube_singularity/dist/ - repository_url: https://upload.pypi.org/legacy/ - verbose: true - env: - LOGLEVEL: DEBUG - - kubernetes_runner_deploy: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: '3.x' - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install setuptools wheel twine - - name: Build distribution - run: | - cd runners/mlcube_k8s - python setup.py sdist bdist_wheel - - name: Publish - uses: pypa/gh-action-pypi-publish@release/v1 - with: - user: ${{ secrets.PYPI_USER }} - verify_metadata: true - skip_existing: true - password: ${{ secrets.PYPI_PASSWORD }} - packages_dir: runners/mlcube_k8s/dist/ - repository_url: https://upload.pypi.org/legacy/ - verbose: true - env: - LOGLEVEL: DEBUG - - gcp_runner_deploy: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: '3.x' - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install setuptools wheel twine - - name: Build distribution - run: | - cd runners/mlcube_gcp - python setup.py sdist bdist_wheel - - name: Publish - uses: pypa/gh-action-pypi-publish@release/v1 - with: - user: ${{ secrets.PYPI_USER }} - verify_metadata: true - skip_existing: true - password: ${{ secrets.PYPI_PASSWORD }} - packages_dir: runners/mlcube_gcp/dist/ - repository_url: https://upload.pypi.org/legacy/ + repository_url: https://test.pypi.org/legacy/ verbose: true env: LOGLEVEL: DEBUG - - kubeflow_runner_deploy: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: '3.x' - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install setuptools wheel twine - - name: Build distribution - run: | - cd runners/mlcube_kubeflow - python setup.py sdist bdist_wheel - - name: Publish - uses: pypa/gh-action-pypi-publish@release/v1 - with: - user: ${{ secrets.PYPI_USER }} - verify_metadata: true - skip_existing: true - password: ${{ secrets.PYPI_PASSWORD }} - packages_dir: runners/mlcube_kubeflow/dist/ - repository_url: https://upload.pypi.org/legacy/ - verbose: true - env: - LOGLEVEL: DEBUG