refa(devcontainer): rework to use mise for fast switching #47
Workflow file for this run
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 & push devcontainer" | |
| on: | |
| push: | |
| branches: | |
| - master | |
| paths: | |
| - .devcontainer/** | |
| - .github/workflows/build_images.yml | |
| # Uncomment if you want to test things out in a PR | |
| pull_request: | |
| paths: | |
| - .devcontainer/** | |
| - .github/workflows/build_images.yml | |
| permissions: | |
| contents: read | |
| packages: write # Required for GHCR | |
| jobs: | |
| build-and-push: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - flavor: modern | |
| base_image: ubuntu:latest | |
| ruby_version: "3.4.8" | |
| - flavor: legacy | |
| base_image: ubuntu:22.04 | |
| ruby_version: "2.7.8" | |
| steps: | |
| - name: Check out current commit | |
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| - name: Build and push devcontainer image | |
| id: build | |
| uses: getsentry/action-build-and-push-images@8fc75e483c09a68721f2c8951292ee17f8821766 # main | |
| with: | |
| image_name: "sentry-ruby-devcontainer-${{ matrix.flavor }}" | |
| dockerfile_path: ".devcontainer/Dockerfile" | |
| ghcr: true | |
| publish_on_pr: true | |
| build_args: | | |
| BASE_IMAGE=${{ matrix.base_image }} | |
| RUBY_VERSION=${{ matrix.ruby_version }} | |
| - name: Use outputs | |
| run: | | |
| echo "GHCR URL: ${{ steps.build.outputs.ghcr_image_url }}" |