feat: add devcontainer container on ghcr (#1240)
Signed-off-by: Devin Buhl <devin@buhl.casa>
This commit is contained in:
1 parent
8860565d25
commit
2206dbc519
4 files changed
+73
-29
No files matched your search
@@ -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,24 +1,13 @@
|
||||
{
|
||||
"name": "Home Ops",
|
||||
"image": "mcr.microsoft.com/devcontainers/base:bullseye",
|
||||
"containerEnv": {
|
||||
"KUBECONFIG": "${containerWorkspaceFolder}/kubeconfig",
|
||||
"SOPS_AGE_KEY_FILE": "${containerWorkspaceFolder}/age.key"
|
||||
},
|
||||
"image": "ghcr.io/onedr0p/flux-cluster-template/devcontainer:base",
|
||||
"postCreateCommand": {
|
||||
"deps": "${containerWorkspaceFolder}/.devcontainer/postCreateCommand.sh"
|
||||
},
|
||||
"features": {
|
||||
"ghcr.io/devcontainers/features/common-utils:2": {
|
||||
"configureZshAsDefaultShell": true
|
||||
},
|
||||
"ghcr.io/devcontainers/features/kubectl-helm-minikube:1": {
|
||||
"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/cloudflared:1": {},
|
||||
"ghcr.io/devcontainers-contrib/features/go-task:1": {},
|
||||
@@ -30,21 +19,5 @@
|
||||
"ghcr.io/jsburckhardt/devcontainer-features/flux:1": {},
|
||||
"ghcr.io/rio/features/kustomize: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"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -12,7 +12,7 @@ concurrency:
|
||||
|
||||
jobs:
|
||||
yay:
|
||||
name: yay
|
||||
name: workstation (yay)
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
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' }}
|
||||
Reference in new issue
Block a user