From 345bba68f3f311d507eae56e1c5abb7126746b8c Mon Sep 17 00:00:00 2001 From: Tuomas Tielinen Date: Mon, 26 Aug 2024 13:34:40 +0300 Subject: [PATCH] Initial commit --- .devcontainer/Containerfile | 1 + .devcontainer/devcontainer.json | 45 +++++++++++++++++++++++ .github/workflows/build-ansible-image.yml | 30 +++++++++++++++ README.md | 4 ++ 4 files changed, 80 insertions(+) create mode 100644 .devcontainer/Containerfile create mode 100644 .devcontainer/devcontainer.json create mode 100644 .github/workflows/build-ansible-image.yml diff --git a/.devcontainer/Containerfile b/.devcontainer/Containerfile new file mode 100644 index 0000000..c286a42 --- /dev/null +++ b/.devcontainer/Containerfile @@ -0,0 +1 @@ +FROM mcr.microsoft.com/devcontainers/base:ubuntu \ No newline at end of file diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..6765c4c --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,45 @@ +{ + "name": "Ubuntu", + "build": { + "dockerfile": "Containerfile" + }, + "mounts": [ + "source=${localEnv:HOME},target=/host-home-folder,type=bind,consistency=cached" + ], + "features": { + "ghcr.io/rjfmachado/devcontainer-features/cloud-native:1": {}, + "ghcr.io/devcontainers/features/python:1": {}, + "ghcr.io/hspaans/devcontainer-features/ansible-lint:1": {}, + "ghcr.io/akhildevelops/devcontainer-features/pip:0": { + "PACKAGES": "ansible" + }, + "ghcr.io/eitsupi/devcontainer-features/jq-likes:2": { + "jq": "latest", + "yq": "latest" + }, + "ghcr.io/gickis/devcontainer-features/kubeseal:1": {}, + "ghcr.io/schlich/devcontainer-features/starship": {}, + "ghcr.io/paul-gilber/devcontainer-features/buildah-apt-get:1": {} + }, + "customizations": { + "vscode": { + "settings": { + "ansible.validation.lint.path": "/usr/local/bin/ansible-lint", + "ansible.ansible.path": "/usr/local/bin/ansible" + }, + "extensions": [ + "adamhartford.vscode-base64", + "coolbear.systemd-unit-file", + "GitHub.copilot", + "GitHub.copilot-chat", + "GitHub.vscode-github-actions", + "jlcs-es.x509-parser", + "mads-hartmann.bash-ide-vscode", + "ms-azuretools.vscode-docker", + "redhat.ansible", + "redhat.vscode-yaml", + "yzhang.markdown-all-in-one" + ] + } + } +} \ No newline at end of file diff --git a/.github/workflows/build-ansible-image.yml b/.github/workflows/build-ansible-image.yml new file mode 100644 index 0000000..bc08937 --- /dev/null +++ b/.github/workflows/build-ansible-image.yml @@ -0,0 +1,30 @@ +name: 'build' +on: # rebuild any PRs and main branch changes + pull_request: + push: + branches: + - main + schedule: + - cron: '30 5 * * *' + +jobs: + build: + 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.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Pre-build dev container image + uses: devcontainers/ci@v0.3 + with: + imageName: ghcr.io/tuomastielinen/dev-container-work-tools/devcontainer + cacheFrom: ghcr.io/tuomastielinen/dev-container-work-tools/devcontainer + push: always \ No newline at end of file diff --git a/README.md b/README.md index 1414201..c5f1cd7 100644 --- a/README.md +++ b/README.md @@ -1 +1,5 @@ # dev-container-work-tools + +## Dev Containers + +Available features can be found [here](https://containers.dev/features). \ No newline at end of file