-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create workflow for testing for the ruby feature
This workflow spins up a devcontainer that uses the ruby feature and checks that ruby is installed.
- Loading branch information
1 parent
911e367
commit c2d0cbb
Showing
3 changed files
with
52 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,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" | ||
} |
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 @@ | ||
../../features |
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,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/ci@v0.3 | ||
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 ) |