name: Devcontainer
on:
  pull_request:
    branches:
      - main
    types:
      - opened
      - synchronize
      - reopened
      - ready_for_review

permissions:
  contents: read

jobs:
  devcontainer-test:
    runs-on: ubuntu-latest
    if: github.event.pull_request.draft != true
    steps:
      - name: Checkout
        uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
        with:
          show-progress: false

      - name: Build and run dev container task
        uses: devcontainers/ci@8bf61b26e9c3a98f69cb6ce2f88d24ff59b785c6 # v0.3.1900000417
        with:
          runCmd: pnpm build
