feat: add devcontainer prebuild via GHCR and GitHub Actions #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build devcontainer image | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - '.devcontainer/**' | |
| - 'pyproject.toml' | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Log in to GHCR | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.repository_owner }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build and push devcontainer | |
| uses: devcontainers/ci@v0.3 | |
| with: | |
| imageName: ghcr.io/${{ github.repository_owner }}/markdown-keeper-devcontainer | |
| cacheFrom: ghcr.io/${{ github.repository_owner }}/markdown-keeper-devcontainer:latest | |
| push: always |