Skip to content

Commit

Permalink
Repo image
Browse files Browse the repository at this point in the history
  • Loading branch information
Chuxel committed Aug 30, 2022
1 parent 8807935 commit a2d1189
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
FROM mcr.microsoft.com/devcontainers/javascript-node:1-18
RUN su vscode -c "npm install -g @devcontainers/cli"
6 changes: 4 additions & 2 deletions .devcontainer.json → .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"image": "mcr.microsoft.com/vscode/devcontainers/javascript-node:0-18",
"build": {
"dockerfile": "Dockerfile",
"cacheFrom": "ghcr.io/chuxel/feature-library/images/repo-devcontainer-cache:latest"
},
"customizations": {
"vscode": {
"extensions": [
Expand All @@ -15,6 +18,5 @@
"features": {
"ghcr.io/devcontainers/features/docker-in-docker:1": {}
},
"postCreateCommand": "npm install -g @devcontainers/cli",
"remoteUser": "node"
}
35 changes: 35 additions & 0 deletions .github/workflows/devcontainer-image.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: 'Dev container image build'
on:
workflow_dispatch:
schedule:
- cron: '0 0 1 * *'
push:
branches:
- 'devcontainer-test'
- 'main'
paths:
- '.devcontainer/**/*'
- '.github/workflows/devcontainer-image.yml'
permissions:
contents: write
packages: write

jobs:
build-image:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: docker/setup-buildx-action@v1
- uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build image
uses: devcontainers/[email protected]
with:
imageName: ghcr.io/chuxel/feature-library/images/repo-devcontainer-cache:latest
push: always


0 comments on commit a2d1189

Please sign in to comment.