diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..79d5588 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,45 @@ +{ + "name": "Dissect", + "image": "python:3.13-bookworm", + "features": { + "ghcr.io/devcontainers/features/common-utils:2": { + "installZsh": "true", + "configureZshAsDefaultShell": "true", + "username": "user", + "userUid": "1000", + "userGid": "1000", + "upgradePackages": "true" + }, + "ghcr.io/devcontainers/features/python:1": { + "toolsToInstall": "tox" + }, + "ghcr.io/devcontainers/features/git-lfs:1": { + "autoPull": true, + "version": "latest" + } + }, + "customizations": { + "vscode": { + "extensions": [ + "charliermarsh.ruff" + ], + "settings": { + "python.analysis.autoImportCompletions": true, + "python.analysis.indexing": true, + "python.analysis.inlayHints.functionReturnTypes": true, + "python.analysis.packageIndexDepths": [ + { + "name": "dissect", + "depth": 69, + "includeAllSymbols": true + } + ], + "[python]": { + "editor.formatOnSave": true, + "editor.defaultFormatter": "charliermarsh.ruff" + } + } + } + }, + "remoteUser": "user" +} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..1cd5fbb --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,37 @@ +name: "Release devcontainer image" +on: + pull_request: + push: + branches: + - main + workflow_dispatch: + schedule: + - cron: "0 0 1 * *" + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout (GitHub) + uses: actions/checkout@v4 + + - name: Login to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Pre-build and publish dev container image + uses: devcontainers/ci@v0.3 + with: + imageName: ghcr.io/fox-it/dissect-devcontainer + cacheFrom: ghcr.io/fox-it/dissect-devcontainer + push: filter + refFilterForPush: refs/heads/main + eventFilterForPush: | + push + schedule + workflow_dispatch + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}