Run CI actions on ubuntu 24.04 since ubuntu 20.04 is being deprecated… #739
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Publish Docker Containers | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| build: | |
| runs-on: linux.24_04.4x | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - name: Setup Python | |
| uses: actions/setup-python@v2 | |
| with: | |
| python-version: "3.10" | |
| architecture: x64 | |
| - name: Checkout TorchX | |
| uses: actions/checkout@v2 | |
| - name: Get TorchX version | |
| run: | | |
| set -eux | |
| python setup.py install | |
| echo "VERSION=$(python -c 'import torchx; print(torchx.__version__)')" >> $GITHUB_ENV | |
| - name: Configure Docker | |
| run: | | |
| set -eux | |
| echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u $GITHUB_ACTOR --password-stdin | |
| - name: Build torchx container | |
| run: | | |
| set -eux | |
| torchx/runtime/container/build.sh | |
| docker tag torchx "ghcr.io/pytorch/torchx:$VERSION" | |
| - name: Push containers | |
| run: | | |
| set -eux | |
| docker push "ghcr.io/pytorch/torchx:$VERSION" |