Merge pull request #112 from a5chin/renovate/python-3.x #32
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: Devcontainer | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - ".devcontainer/docker-compose.yml" | |
| - ".devcontainer/Dockerfile" | |
| - ".github/workflows/devcontainer.yml" | |
| - ".python-version" | |
| pull_request: | |
| branches: [main] | |
| paths: | |
| - ".devcontainer/docker-compose.yml" | |
| - ".devcontainer/Dockerfile" | |
| - ".github/workflows/devcontainer.yml" | |
| - ".python-version" | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Lint Dockerfile | |
| uses: hadolint/hadolint-action@v3.3.0 | |
| with: | |
| dockerfile: .devcontainer/Dockerfile | |
| build: | |
| runs-on: ubuntu-latest | |
| needs: lint | |
| if: ${{ success() }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Docker Meta | |
| id: meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: vscode | |
| tags: | | |
| latest | |
| - name: Build Image for VSCode | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: .devcontainer/Dockerfile | |
| push: false | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| - name: Compose up vscode | |
| run: docker compose -f '.devcontainer/docker-compose.yml' up -d --build 'vscode' |