Migrate components-integration-tests to Terraform (#892) #641
This file contains 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: ubuntu-20.04 | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: Setup Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.8 | |
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" |