Skip to content

Build & Test Devcontainer Docker Image #2

Build & Test Devcontainer Docker Image

Build & Test Devcontainer Docker Image #2

Workflow file for this run

name: Build & Test Docker Image
on:
workflow_dispatch:
workflow_run:
workflows: "R-CMD-check"
branches: main
types: completed
release:
types: [published]
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true
jobs:
build-devcontainer:
runs-on: ubuntu-latest
if: |
github.event_name == 'workflow_dispatch' ||
github.event_name == 'release' ||
(github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success')
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v4
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and run Dev Container
uses: devcontainers/[email protected]
if: github.ref_name != 'main'
with:
subFolder: .github
imageName: ghcr.io/mcanouil/eggla
cacheFrom: ghcr.io/mcanouil/eggla
imageTag: ${{github.ref_name}}
platform: linux/amd64
push: always
runCmd: Rscript eggla-example.R
- name: Build and run Dev Container
uses: devcontainers/[email protected]
if: github.ref_name == 'main'
with:
subFolder: .github
imageName: ghcr.io/mcanouil/eggla
cacheFrom: ghcr.io/mcanouil/eggla
imageTag: "devel"
platform: linux/amd64
push: always
runCmd: Rscript eggla-example.R