Push Docker Nightly #983
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: Push Docker Nightly | |
on: | |
# Run every day at 1:15pm | |
schedule: | |
- cron: "15 13 * * *" | |
workflow_dispatch: | |
jobs: | |
nightly: | |
runs-on: [self-hosted, ci-gpu] | |
steps: | |
- name: Clean up previous run | |
run: | | |
echo "Cleaning up previous run" | |
ls -la ./ | |
sudo rm -rf ./* || true | |
sudo rm -rf ./.??* || true | |
ls -la ./ | |
- name: Setup Python 3.9 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.9 | |
architecture: x64 | |
- name: Checkout TorchServe | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Login to Docker | |
env: | |
DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}} | |
run: docker login --username pytorchbot --password "$DOCKER_PASSWORD" | |
- name: Push Docker Nightly | |
run: | | |
cd docker | |
sudo apt-get update | |
docker buildx use multibuilder | |
python docker_nightly.py --cleanup | |
- name: Push KServe Docker Nightly | |
run: | | |
cd kubernetes/kserve | |
docker buildx use multibuilder | |
python docker_nightly.py --cleanup | |
- name: Open issue on failure | |
if: ${{ failure() && github.event_name == 'schedule' }} | |
uses: dacbd/create-issue-action@v1 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
title: Nightly Docker build failed | |
body: Commit ${{ github.sha }} daily scheduled [CI run](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}) failed, please check why | |
assignees: "" |