feat: add devcontainer container on ghcr (#1240)

Signed-off-by: Devin Buhl <devin@buhl.casa>
This commit is contained in:
Devin Buhl authored and GitHub committed 2024-01-23 10:31:10 -05:00
1 parent 8860565d25
commit 2206dbc519
4 files changed
+73 -29

No files matched your search

+29
View File
@@ -0,0 +1,29 @@
{
"name": "Home Ops",
"image": "mcr.microsoft.com/devcontainers/base:bullseye",
"features": {
"ghcr.io/devcontainers/features/common-utils:2": {
"configureZshAsDefaultShell": true
},
"ghcr.io/devcontainers/features/python:1": {
"version": "3.11.7",
"installTools": false
}
},
"customizations": {
"vscode": {
"settings": {
"terminal.integrated.profiles.linux": {
"bash": {
"path": "/bin/zsh"
}
},
"terminal.integrated.defaultProfile.linux": "zsh"
},
"extensions": [
"redhat.ansible",
"redhat.vscode-yaml"
]
}
}
}
+1 -28
View File
@@ -1,24 +1,13 @@
{ {
"name": "Home Ops", "name": "Home Ops",
"image": "mcr.microsoft.com/devcontainers/base:bullseye", "image": "ghcr.io/onedr0p/flux-cluster-template/devcontainer:base",
"containerEnv": {
"KUBECONFIG": "${containerWorkspaceFolder}/kubeconfig",
"SOPS_AGE_KEY_FILE": "${containerWorkspaceFolder}/age.key"
},
"postCreateCommand": { "postCreateCommand": {
"deps": "${containerWorkspaceFolder}/.devcontainer/postCreateCommand.sh" "deps": "${containerWorkspaceFolder}/.devcontainer/postCreateCommand.sh"
}, },
"features": { "features": {
"ghcr.io/devcontainers/features/common-utils:2": {
"configureZshAsDefaultShell": true
},
"ghcr.io/devcontainers/features/kubectl-helm-minikube:1": { "ghcr.io/devcontainers/features/kubectl-helm-minikube:1": {
"minikube": "none" "minikube": "none"
}, },
"ghcr.io/devcontainers/features/python:1": {
"version": "3.11.7",
"installTools": false
},
"ghcr.io/devcontainers-contrib/features/age:1": {}, "ghcr.io/devcontainers-contrib/features/age:1": {},
"ghcr.io/devcontainers-contrib/features/cloudflared:1": {}, "ghcr.io/devcontainers-contrib/features/cloudflared:1": {},
"ghcr.io/devcontainers-contrib/features/go-task:1": {}, "ghcr.io/devcontainers-contrib/features/go-task:1": {},
@@ -30,21 +19,5 @@
"ghcr.io/jsburckhardt/devcontainer-features/flux:1": {}, "ghcr.io/jsburckhardt/devcontainer-features/flux:1": {},
"ghcr.io/rio/features/kustomize:1": {}, "ghcr.io/rio/features/kustomize:1": {},
"ghcr.io/gickis/devcontainer-features/kubeconform:1": {} "ghcr.io/gickis/devcontainer-features/kubeconform:1": {}
},
"customizations": {
"vscode": {
"settings": {
"terminal.integrated.profiles.linux": {
"bash": {
"path": "/bin/zsh"
}
},
"terminal.integrated.defaultProfile.linux": "zsh"
},
"extensions": [
"redhat.ansible",
"redhat.vscode-yaml"
]
}
} }
} }
+1 -1
View File
@@ -12,7 +12,7 @@ concurrency:
jobs: jobs:
yay: yay:
name: yay name: workstation (yay)
runs-on: ubuntu-latest runs-on: ubuntu-latest
container: container:
image: greyltc/archlinux-aur:yay image: greyltc/archlinux-aur:yay
@@ -0,0 +1,42 @@
---
name: "Publish devcontainer"
on:
workflow_dispatch:
push:
branches: ["main"]
paths: [".devcontainer/devcontainer.build.json"]
pull_request:
branches: ["main"]
paths: [".devcontainer/devcontainer.build.json"]
concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
cancel-in-progress: true
jobs:
publish-devcontainer:
name: Publish devcontainer
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
- if: ${{ github.event_name != 'pull_request' }}
name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: devcontainers/ci@v0.3
with:
imageName: ghcr.io/${{ github.repository }}/devcontainer
imageTag: base,latest
configFile: .devcontainer/devcontainer.build.json
push: ${{ github.event_name == 'pull_request' && 'never' || 'always' }}