diff --git a/.devcontainer/ci/devcontainer.json b/.devcontainer/ci/devcontainer.json new file mode 100644 index 00000000..b0fe89ea --- /dev/null +++ b/.devcontainer/ci/devcontainer.json @@ -0,0 +1,44 @@ +{ + "name": "Flux Cluster Template (CI)", + "image": "mcr.microsoft.com/devcontainers/base:bullseye", + "features": { + "ghcr.io/audacioustux/devcontainers/cilium:1": {}, + "ghcr.io/devcontainers/features/common-utils:2": { + "configureZshAsDefaultShell": true + }, + "ghcr.io/devcontainers/features/python:1": { + "version": "3.11.7", + "installTools": false + }, + "ghcr.io/devcontainers/features/kubectl-helm-minikube:1": { + "minikube": "none" + }, + "ghcr.io/devcontainers-contrib/features/age:1": {}, + "ghcr.io/devcontainers-contrib/features/cloudflared:1": {}, + "ghcr.io/devcontainers-contrib/features/go-task:1": {}, + "ghcr.io/devcontainers-contrib/features/direnv:1": {}, + "ghcr.io/devcontainers-contrib/features/sops:1": {}, + "ghcr.io/dhoeric/features/stern:1": {}, + "ghcr.io/eitsupi/devcontainer-features/jq-likes:2": {}, + "ghcr.io/framctr/devcontainer-features/talosctl:1": {}, + "ghcr.io/gickis/devcontainer-features/kubeconform:1": {}, + "ghcr.io/jsburckhardt/devcontainer-features/flux:1": {}, + "ghcr.io/rio/features/kustomize:1": {} + }, + "customizations": { + "vscode": { + "settings": { + "terminal.integrated.profiles.linux": { + "bash": { + "path": "/bin/zsh" + } + }, + "terminal.integrated.defaultProfile.linux": "zsh" + }, + "extensions": [ + "redhat.ansible", + "redhat.vscode-yaml" + ] + } + } +} diff --git a/.devcontainer/devcontainer.build.json b/.devcontainer/devcontainer.build.json deleted file mode 100644 index 3aaf8d05..00000000 --- a/.devcontainer/devcontainer.build.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "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" - ] - } - } -} diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 2aa8e6cd..8631919d 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,23 +1,7 @@ { - "name": "Home Ops", + "name": "Flux Cluster Template", "image": "ghcr.io/onedr0p/flux-cluster-template/devcontainer:base", "postCreateCommand": { "deps": "${containerWorkspaceFolder}/.devcontainer/postCreateCommand.sh" - }, - "features": { - "ghcr.io/devcontainers/features/kubectl-helm-minikube:1": { - "minikube": "none" - }, - "ghcr.io/devcontainers-contrib/features/age:1": {}, - "ghcr.io/devcontainers-contrib/features/cloudflared:1": {}, - "ghcr.io/devcontainers-contrib/features/go-task:1": {}, - "ghcr.io/devcontainers-contrib/features/direnv:1": {}, - "ghcr.io/devcontainers-contrib/features/sops:1": {}, - "ghcr.io/audacioustux/devcontainers/cilium:1": {}, - "ghcr.io/dhoeric/features/stern:1": {}, - "ghcr.io/eitsupi/devcontainer-features/jq-likes:2": {}, - "ghcr.io/jsburckhardt/devcontainer-features/flux:1": {}, - "ghcr.io/rio/features/kustomize:1": {}, - "ghcr.io/gickis/devcontainer-features/kubeconform:1": {} } } diff --git a/.github/workflows/publish-devcontainer.yaml b/.github/workflows/publish-devcontainer.yaml index 52e25d53..7e41463b 100644 --- a/.github/workflows/publish-devcontainer.yaml +++ b/.github/workflows/publish-devcontainer.yaml @@ -5,10 +5,12 @@ on: workflow_dispatch: push: branches: ["main"] - paths: [".devcontainer/devcontainer.build.json"] + paths: [".devcontainer/ci/devcontainer.json"] pull_request: branches: ["main"] - paths: [".devcontainer/devcontainer.build.json"] + paths: [".devcontainer/ci/devcontainer.json"] + schedule: + - cron: "0 0 * * 1" concurrency: group: ${{ github.workflow }}-${{ github.event.number || github.ref }} @@ -25,13 +27,13 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 + # - name: Set up QEMU + # uses: docker/setup-qemu-action@v3 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - with: - platforms: linux/amd64,linux/arm64 + # - name: Set up Docker Buildx + # uses: docker/setup-buildx-action@v3 + # with: + # platforms: linux/amd64,linux/arm64 - if: ${{ github.event_name != 'pull_request' }} name: Login to GitHub Container Registry @@ -46,6 +48,6 @@ jobs: with: imageName: ghcr.io/${{ github.repository }}/devcontainer imageTag: base,latest - platform: linux/amd64,linux/arm64 - configFile: .devcontainer/devcontainer.build.json + # platform: linux/amd64,linux/arm64 + configFile: .devcontainer/ci/devcontainer.json push: ${{ github.event_name == 'pull_request' && 'never' || 'always' }}