Skip to content

Commit

Permalink
added missing workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
ori-kron-wis committed Aug 19, 2024
1 parent 4f0410d commit ed4e97f
Show file tree
Hide file tree
Showing 3 changed files with 130 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/build_image_base.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: build image (base)

on:
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest

defaults:
run:
shell: bash -e {0} # -e to fail on error

permissions:
contents: read
packages: write

steps:
- uses: actions/checkout@v4

- uses: docker/setup-buildx-action@v3

- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: true
cache-from: type=registry,ref=ghcr.io/scverse/scvi-tools:buildcache
cache-to: type=inline,ref=ghcr.io/scverse/scvi-tools:buildcache
target: base
tags: ghcr.io/scverse/scvi-tools:py3.11-cu12-base
65 changes: 65 additions & 0 deletions .github/workflows/build_image_latest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: build image (latest)

on:
push:
branches: [main, "[0-9]+.[0-9]+.x"]
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest

defaults:
run:
shell: bash -e {0} # -e to fail on error

permissions:
contents: read
packages: write

strategy:
fail-fast: false
matrix:
dependencies: ["", "dev", "tutorials"]

steps:
- uses: actions/checkout@v4

- uses: docker/setup-buildx-action@v3

- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Set build inputs
id: build
run: |
INPUT_DEPENDENCIES=${{ matrix.dependencies }}
DEPENDENCIES=${INPUT_DEPENDENCIES:-"runtime"}
echo "dependencies=${DEPENDENCIES}" >> $GITHUB_OUTPUT
INPUT_REF=${{ github.ref_name }}
if [[ $INPUT_REF == "main" ]]; then
VERSION="latest"
else
VERSION=${INPUT_REF}
fi
echo "version=${VERSION}" >> $GITHUB_OUTPUT
- uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: true
cache-from: type=registry,ref=ghcr.io/scverse/scvi-tools:buildcache
cache-to: type=inline,ref=ghcr.io/scverse/scvi-tools:buildcache
target: build
tags: ghcr.io/scverse/scvi-tools:py3.11-cu12-${{ steps.build.outputs.version }}-${{ steps.build.outputs.dependencies }}
build-args: |
DEPENDENCIES=${{ matrix.dependencies }}
24 changes: 24 additions & 0 deletions .github/workflows/tutorials.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: update tutorials

on:
workflow_dispatch:

jobs:
update:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
submodules: "recursive"

- name: Update tutorials 🔧
run: git submodule update --remote --recursive

- uses: peter-evans/create-pull-request@v6
with:
commit-message: "docs: automated update of tutorials"
title: "docs: automated update of tutorials"
branch: "update-tutorials"
base: "main"
body: "automated update of tutorials submodule"

0 comments on commit ed4e97f

Please sign in to comment.