-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[build] Add GitHub Actions workflow for Docker images (#66)
* Add GitHub Actions workflow for Docker images * Batch Dependabot updates * Make python3 default by installing python-is-python3 * update nodejs installation and silence w90 wget/tar * Install Python dependencies via APT * Backport linkify-it-py --------- Co-authored-by: Alexander Hampel <[email protected]>
- Loading branch information
1 parent
89998a9
commit 763f469
Showing
8 changed files
with
294 additions
and
233 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,10 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" | ||
groups: | ||
batch: | ||
patterns: | ||
- "*" |
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,57 @@ | ||
name: Create and publish Docker images | ||
|
||
on: | ||
push: { branches: [ unstable ] } | ||
pull_request: { branches: [ unstable ] } | ||
workflow_call: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build-and-push-image: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- name: github_ci | ||
- name: openmpi | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Docker buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Log in to the Container registry | ||
if: github.event_name != 'pull_request' | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Extract metadata (tags, labels) for Docker | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: ghcr.io/${{ github.repository }}_${{ matrix.name }} | ||
|
||
- name: Build and push Docker image | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: ./Docker | ||
file: ./Docker/${{ matrix.name }}_dockerfile | ||
build-args: | | ||
NCORES=2 | ||
# cache pkgs layer in dockerfile | ||
no-cache-filters: pkgs | ||
push: ${{ github.event_name != 'pull_request' }} | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
cache-from: type=gha,scope=${{ github.ref_name }}-${{ matrix.name }} | ||
cache-to: type=gha,mode=max,scope=${{ github.ref_name }}-${{ matrix.name }} |
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
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/bin/bash | ||
|
||
# start script for jupyterlab | ||
jupyter-lab --no-browser --port 8378 --ip=0.0.0.0 | ||
# start script for jupyter notebook | ||
jupyter notebook --no-browser --port 8378 --ip=0.0.0.0 |
Oops, something went wrong.