Skip to content

Commit

Permalink
refactor for flexibility
Browse files Browse the repository at this point in the history
  • Loading branch information
usrbinkat authored Jan 22, 2024
1 parent 3eb23e8 commit ac9bc13
Show file tree
Hide file tree
Showing 140 changed files with 13,976 additions and 371 deletions.
1 change: 1 addition & 0 deletions .devcontainer.json
1 change: 0 additions & 1 deletion .envrc

This file was deleted.

1 change: 1 addition & 0 deletions .frontmatter/database/taxonomyDb.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
1 change: 0 additions & 1 deletion .github/docker/Dockerfile

This file was deleted.

27 changes: 22 additions & 5 deletions .github/workflows/build.yaml → .github/workflows/container.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
name: devcontainer
##################################################################################
# References:
# Built-in arguments:
# - https://docs.github.com/en/actions/learn-github-actions/contexts
# Built-in environment variables:
# - https://docs.github.com/en/enterprise-cloud@latest/actions/learn-github-actions/variables#default-environment-variables
#
# Develop this workflow locally with the following command:
# ~$ gh extension install nektos/gh-act
# ~$ gh act --env-file .env -s GITHUB_TOKEN=$GITHUB_TOKEN -s PULUMI_ACCESS_TOKEN=$PULUMI_ACCESS_TOKEN

name: container
on:
workflow_dispatch:
push:
Expand All @@ -7,13 +18,15 @@ on:
paths-ignore:
- '.devcontainer/**'
- '.vscode/**'
- 'docs/**'
- '**.md'
pull_request:
branches:
- main
paths-ignore:
- '.devcontainer/**'
- '.vscode/**'
- 'docs/**'
- '**.md'
schedule:
- cron: '0 0 * * 0'
Expand All @@ -31,6 +44,10 @@ jobs:
name: Git Checkout
uses: actions/checkout@v4
id: git
with:
ref: 'main'
submodules: 'recursive'
clean: ''
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
Expand Down Expand Up @@ -60,9 +77,9 @@ jobs:
with:
string: ${{ github.repository }}
-
name: Container Build
name: Build & Publish Dev Container
id: docker_build
uses: docker/build-push-action@v5
id: container-build
with:
push: false
cache-to: type=inline
Expand All @@ -72,10 +89,10 @@ jobs:
platforms: linux/amd64,linux/arm64
tags: "ghcr.io/${{ steps.repository.outputs.lowercase }}:latest,ghcr.io/${{ steps.repository.outputs.lowercase }}:${{ github.sha }}"
-
name: Push Dev Container Image
id: docker_push
if: ${{ github.event_name == 'push' }} && ${{ github.ref == 'refs/heads/main' }}
name: Container Push
uses: docker/build-push-action@v5
id: container-push
with:
push: true
cache-from: type=inline
Expand Down
2 changes: 1 addition & 1 deletion .gitpod.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
image: ghcr.io/pulumi/devcontainer
image: ghcr.io/pulumi/devcontainer
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM ghcr.io/pulumi/devcontainer:latest

# Add any additional packages and customization for your project here.
71 changes: 0 additions & 71 deletions Makefile

This file was deleted.

5 changes: 5 additions & 0 deletions Makefile.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
devcontainer::
git submodule update --init --recursive .devcontainer
git submodule update --remote --merge .devcontainer
rm -rf .devcontainer.json
cp .devcontainer/devcontainer.json .devcontainer.json
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ To add this repository as a submodule to your project, run the following command
```bash
git submodule add https://github.com/pulumi/devcontainer .github/devcontainer
git submodule update --init --recursive .github/devcontainer
mkdir .devcontainer && cp .github/devcontainer/.devcontainer/* .devcontainer/
mkdir .devcontainer && cp -r .github/devcontainer/devcontainer .devcontainer
```

To update the devcontainer submodule in consuming repos:
Expand Down
File renamed without changes.
76 changes: 76 additions & 0 deletions devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
// Reference:
// - https://containers.dev/features
// - https://containers.dev/implementors/features
// - https://containers.dev/implementors/json_reference
// - https://code.visualstudio.com/docs/getstarted/settings
{
"name": "pulumi",
"dockerFile": "Dockerfile",
"customizations": {
"vscode": {
"settings": {
// https://github.com/VSCodeVim/Vim
"vim.disableExtension": true,
"vim.easymotion": true,
"vim.incsearch": true,
"vim.useSystemClipboard": true,
"vim.useCtrlKeys": true,
"vim.hlsearch": true,
"vim.insertModeKeyBindings": [
{
"before": ["j", "j"],
"after": ["<Esc>"]
}
],
"vim.handleKeys": {
"<C-a>": false,
"<C-f>": false
},
"extensions.experimental.affinity": {
"vscodevim.vim": 1
},
"go.testTags": "all",
"go.buildTags": "all",
"editor.minimap.enabled": false,
"editor.lineNumbers": "relative",
"editor.quickSuggestionsDelay": 0,
"editor.suggestSelection": "first",
"editor.snippetSuggestions": "top",
"editor.gotoLocation.multipleReferences": "goto",
"editor.gotoLocation.multipleDefinitions": "goto",
"editor.gotoLocation.multipleDeclarations": "goto",
"editor.gotoLocation.multipleImplementations": "goto",
"editor.gotoLocation.multipleTypeDefinitions": "goto",
"editor.terminal.integrated.shell.linux": "/usr/bin/bash",
"terminal.integrated.shell.linux": "/usr/bin/bash",
"terminal.integrated.sendKeybindingsToShell": true,
"workbench.colorTheme": "Dracula Soft",
"explorer.openEditors.visible": 1,
"files.trimTrailingWhitespace": true,
"files.trimFinalNewlines": true
},
"extensions": [
"golang.go",
"vscodevim.vim",
"github.copilot",
"vscodevim.vim",
"ms-python.python",
"redhat.vscode-yaml",
"esbenp.prettier-vscode",
"ms-vsliveshare.vsliveshare",
"ms-azuretools.vscode-docker",
"github.vscode-github-actions",
"ms-vscode.vscode-typescript-next",
"github.vscode-pull-request-github",
"ms-vscode-remote.remote-containers",
"visualstudioexptteam.vscodeintellicode",
"bierner.markdown-preview-github-styles"
]
}
},
"remoteUser": "vscode",
"overrideCommand": false,
"runArgs": ["--init", "--privileged", "--network=host"],
"postCreateCommand": "sudo chown $USER /workspaces/* 2>/dev/null || true; direnv allow 2>/dev/null || true",
"forwardPorts": [1313, 2222, 6000, 7681, 8080]
}
File renamed without changes.
Loading

0 comments on commit ac9bc13

Please sign in to comment.