-
Notifications
You must be signed in to change notification settings - Fork 30
47 lines (45 loc) · 1.15 KB
/
docker_images.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
40
41
42
43
44
45
46
47
name: Build Docker images
on:
push:
branches:
- main
workflow_dispatch:
schedule:
- cron: '0 5 * * 3'
jobs:
Build:
strategy:
fail-fast: false
matrix:
platform:
- cpu
- cu102
# - cu110
- cu111
- cu113
- cu116
- cu117
- cu118
- cu121
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.TLCPACK_DOCKERHUB_USERNAME }}
password: ${{ secrets.TLCPACK_DOCKERHUB_TOKEN }}
- name: Build Docker image
run: |
set -eux
cd docker
bash build_image.sh ${{ matrix.platform }}
- name: Upload to Docker Hub
if: ${{ github.ref == 'refs/heads/main' }}
run: |
set -eux
NEW_TAG=$(git log -1 --format='%h')
docker tag tlcpack/package-${{ matrix.platform }}:staging tlcpack/package-${{ matrix.platform }}:$NEW_TAG
docker push tlcpack/package-${{ matrix.platform }}:$NEW_TAG