Skip to content

Update Dockerfile with new default Ruby 3.3.0 #5

Update Dockerfile with new default Ruby 3.3.0

Update Dockerfile with new default Ruby 3.3.0 #5

Workflow file for this run

name: Update README
on:
push:
jobs:
get-container-versions:
runs-on: ubuntu-22.04
outputs:
current: ${{ steps.fetch-image-versions.outputs.current }}
old: ${{ steps.fetch-image-versions.outputs.old }}
steps:
- name: Fetch latest container images
id: fetch-image-versions
run: |
token=$(curl -sL https://ghcr.io/token?scope=repository:moritzheiber/ruby-jemalloc:pull | jq -Mcj .token)
versions=$(curl -sL --header "Authorization: Bearer ${token}" https://ghcr.io/v2/moritzheiber/ruby-jemalloc/tags/list)
versions_thirty=$(echo ${versions} | jq -Mcj '.tags | map(scan("3\\.0\\.\\d*")) | unique | sort')
versions_thirtyone=$(echo ${versions} | jq -Mcj '.tags | map(scan("3\\.1\\.\\d*")) | unique | sort')
versions_thirtytwo=$(echo ${versions} | jq -Mcj '.tags | map(scan("3\\.2\\.\\d*")) | unique | sort')
current_thirty=$(echo ${versions_thirty} | jq -Mcj '.[-1:]')
current_thirtyone=$(echo ${versions_thirtyone} | jq -Mcj '.[-1:]')
current_thirtytwo=$(echo ${versions_thirtytwo} | jq -Mcj '.[-1:]')
old_thirty=$(echo ${versions_thirty} | jq -Mcj '.[:-1]')
old_thirtyone=$(echo ${versions_thirtyone} | jq -Mcj '.[:-1]')
old_thirtytwo=$(echo ${versions_thirtytwo} | jq -Mcj '.[:-1]')
echo "current=$(echo [${current_thirty},${current_thirtyone},${current_thirtytwo}] | jq -Mcj '. | flatten | sort')" >> $GITHUB_OUTPUT
echo "old=$(echo [${old_thirty},${old_thirtyone},${old_thirtytwo}] | jq -Mcj '. | flatten | sort')" >> $GITHUB_OUTPUT