Skip to content

Commit

Permalink
Merge pull request #19 from rails/test-ruby-feature
Browse files Browse the repository at this point in the history
Create workflow for testing for the ruby feature
  • Loading branch information
andrewn617 committed Apr 11, 2024
2 parents 911e367 + c2d0cbb commit a526b49
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/.devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"image": "mcr.microsoft.com/devcontainers/base:1-bookworm",
"features": {
"ghcr.io/devcontainers/features/common-utils:2": {
"installZsh": "true",
"username": "vscode",
"userUid": "1000",
"userGid": "1000",
"upgradePackages": "true"
},
"ghcr.io/devcontainers/features/git:1": {
"version": "latest",
"ppa": "false"
},
"./features/ruby": {}
},
// Set `remoteUser` to `root` to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "vscode"
}
1 change: 1 addition & 0 deletions .github/.devcontainer/features
32 changes: 32 additions & 0 deletions .github/workflows/test-ruby-feature.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Test ruby feature

on:
push:

jobs:
build:
name: Test ruby feature

runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Checkout (GitHub)
uses: actions/checkout@v3

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

- name: Build and test devcontainer
uses: devcontainers/[email protected]
with:
imageName: ghcr.io/rails/devcontainer/test-ruby-feature
cacheFrom: ghcr.io/rails/devcontainer/test-ruby-feature
subFolder: .github
refFilterForPush: refs/heads/main
runCmd: ruby -v || ( echo "Ruby is not installed."; exit 1 )

0 comments on commit a526b49

Please sign in to comment.