Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/psc-cuda-devcontainer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ on:
branches: [ main, 'pr/*' ]
pull_request:
branches: [ main ]
workflow_dispatch:
inputs:
push_image:
description: Build and push the devcontainer image to GHCR
required: true
type: boolean
default: true

permissions:
contents: read
Expand All @@ -13,6 +20,7 @@ permissions:
jobs:
build-cuda-devcontainer:
runs-on: ubuntu-latest
if: github.event_name != 'workflow_dispatch'

steps:
- name: Checkout (github)
Expand All @@ -35,3 +43,26 @@ jobs:
runCmd: |
cmake -S . -B build-cuda-ci -DCMAKE_BUILD_TYPE=RelWithDebInfo -DPSC_GPU=cuda -DGTENSOR_DEVICE=cuda -G Ninja
cmake --build build-cuda-ci

push-cuda-devcontainer:
runs-on: ubuntu-latest
if: github.event_name == 'workflow_dispatch' && inputs.push_image

steps:
- name: Checkout (github)
uses: actions/checkout@v4

- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push devcontainer image
uses: devcontainers/ci@v0.3
with:
configFile: .devcontainer/devcontainer.json
imageName: ghcr.io/psc-code/psc-devcontainer
cacheFrom: ghcr.io/psc-code/psc-devcontainer
push: always
Loading