-
Notifications
You must be signed in to change notification settings - Fork 350
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4f0410d
commit ed4e97f
Showing
3 changed files
with
130 additions
and
0 deletions.
There are no files selected for viewing
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
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 |
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
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 }} |
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
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" |