99 - .github/workflows/build_images.yml
1010
1111 # Uncomment if you want to test things out in a PR
12- #
13- # pull_request:
14- # paths:
15- # - .devcontainer/**
16- # - .github/workflows/build_images.yml
12+
13+ pull_request :
14+ paths :
15+ - .devcontainer/**
16+ - .github/workflows/build_images.yml
1717
1818permissions :
1919 contents : read
@@ -36,25 +36,32 @@ jobs:
3636 - name : Check out current commit
3737 uses : actions/checkout@v4
3838
39- - name : Generate short image name
39+ - name : Generate short image name and extract version
4040 id : image_name
4141 run : |
4242 ruby_image="${{ matrix.ruby_image }}"
4343
44+ # Extract full version for GEM_HOME (e.g., ruby:3.4.5-slim-bookworm -> 3.4.5)
4445 if [[ "$ruby_image" == ruby:* ]]; then
46+ full_version=$(echo "$ruby_image" | cut -d: -f2 | cut -d- -f1)
4547 version=$(echo "$ruby_image" | cut -d: -f2 | cut -d. -f1,2)
4648 short_name="sentry-ruby-devcontainer-${version}"
4749 elif [[ "$ruby_image" == jruby:latest ]]; then
50+ full_version="latest"
4851 short_name="sentry-ruby-devcontainer-jruby-latest"
4952 elif [[ "$ruby_image" == jruby:* ]]; then
53+ full_version=$(echo "$ruby_image" | cut -d: -f2 | cut -d- -f1)
5054 version=$(echo "$ruby_image" | cut -d: -f2 | cut -d. -f1,2)
5155 short_name="sentry-ruby-devcontainer-jruby-${version}"
5256 else
57+ full_version="latest"
5358 short_name="sentry-ruby-devcontainer-${ruby_image}"
5459 fi
5560
5661 echo "short_name=${short_name}" >> $GITHUB_OUTPUT
62+ echo "full_version=${full_version}" >> $GITHUB_OUTPUT
5763 echo "Generated short image name: ${short_name}"
64+ echo "Extracted full version: ${full_version}"
5865
5966 - name : Build and push devcontainer image
6067 id : build
6673 publish_on_pr : true
6774 build_args : |
6875 IMAGE=${{ matrix.ruby_image }}
76+ VERSION=${{ steps.image_name.outputs.full_version }}
6977
7078 - name : Use outputs
7179 run : |
0 commit comments