Skip to content

CD - Syft

CD - Syft #87

Workflow file for this run

name: CD - Syft
on:
schedule:
- cron: "00 12 * * */3" # At 12:00 UTC on every three days
workflow_dispatch:
inputs:
skip_tests:
description: "If true, skip tests"
required: false
default: "false"
release_platform:
description: "Release Platform"
required: true
default: "REAL_PYPI"
type: choice
options:
- REAL_PYPI
- TEST_PYPI
- REAL_AND_TEST_PYPI
jobs:
call-pr-tests-linting:
if: github.repository == 'OpenMined/PySyft' && github.event.inputs.skip_tests == 'false' # don't run on forks
uses: OpenMined/PySyft/.github/workflows/pr-tests-linting.yml@dev
call-pr-tests-syft:
if: github.repository == 'OpenMined/PySyft' && github.event.inputs.skip_tests == 'false' # don't run on forks
uses: OpenMined/PySyft/.github/workflows/pr-tests-syft.yml@dev
call-pr-tests-stack:
if: github.repository == 'OpenMined/PySyft' && github.event.inputs.skip_tests == 'false' # don't run on forks
uses: OpenMined/PySyft/.github/workflows/pr-tests-stack.yml@dev
secrets: inherit
deploy-syft:
needs: [call-pr-tests-linting, call-pr-tests-syft, call-pr-tests-stack]
if: always() && (needs.call-pr-tests-linting.result == 'success' && needs.call-pr-tests-syft.result == 'success' && needs.call-pr-tests-stack.result == 'success' || github.event.inputs.skip_tests == 'true')
runs-on: om-ci-16vcpu-ubuntu2204
steps:
- name: Permission to home directory
run: |
sudo chown -R $USER:$USER $HOME
- uses: actions/checkout@v3
with:
token: ${{ secrets.SYFT_BUMP_TOKEN }}
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install --upgrade tox setuptools wheel twine bump2version PyYAML
- name: Set Grid package version
run: echo "GRID_VERSION=$(python packages/grid/VERSION)" >> $GITHUB_ENV
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_LOGIN }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Docker meta for Grid-Node
id: meta_grid_node
uses: docker/metadata-action@v3
with:
images: openmined/grid-node-jupyter
tags: |
type=raw,value=${{ env.GRID_VERSION }}
type=raw,value=beta
- name: Build and push `grid-node` image to DockerHub
uses: docker/build-push-action@v4
with:
context: ./packages
file: ./packages/grid/worker/worker.dockerfile
push: true
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta_grid_node.outputs.tags }}
target: worker
cache-from: type=registry,ref=${{ steps.meta_grid_node.outputs.tags }}
cache-to: type=inline