-
Notifications
You must be signed in to change notification settings - Fork 110
39 lines (37 loc) · 1.02 KB
/
container.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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"