@@ -62,17 +62,17 @@ jobs:
6262 run : sudo apt-get update && sudo apt-get install -y jq
6363
6464 - name : Install uv
65- uses : astral-sh/setup-uv@v4
65+ uses : astral-sh/setup-uv@v7
6666 with :
6767 version : latest
6868
6969 - name : Set up Python
70- uses : actions/setup-python@v5
70+ uses : actions/setup-python@v6
7171 with :
72- python-version : " 3.10 "
72+ python-version-file : .python-version
7373
7474 - name : Check out code before change
75- uses : actions/checkout@v4
75+ uses : actions/checkout@v6
7676 with :
7777 ref : ${{ inputs.before_commit }}
7878
@@ -123,20 +123,22 @@ jobs:
123123 id : get-code-artifact-index-url
124124 if : steps.save-changes.outputs.num_changed_packages > 0
125125 run : |
126- echo 'index_url<<EOF' >> $GITHUB_OUTPUT
127- ./.github/workflows/scripts/code-artifact.sh index-url \
126+ index_url=$(./.github/workflows/scripts/code-artifact.sh index-url \
128127 "${{ inputs.aws_account_id }}" "${{ inputs.aws_region }}" \
129- "${{ inputs.domain }}" "${{ inputs.repository }}" >> $GITHUB_OUTPUT
130- echo EOF >> $GITHUB_OUTPUT
128+ "${{ inputs.domain }}" "${{ inputs.repository }}")
129+ echo "::add-mask::${index_url}"
130+ echo "index_url=${index_url}" >> $GITHUB_OUTPUT
131131
132132 - name : Fail if any of the new versions already exist in the repo
133133 if : steps.save-changes.outputs.num_changed_packages > 0
134+ env :
135+ INDEX_URL : ${{ steps.get-code-artifact-index-url.outputs.index_url }}
134136 run : |
135137 jq -c '.[]' /tmp/package-version-diff.json | while read -r entry; do
136138 package=$(echo "$entry" | jq -r '.package')
137139 after=$(echo "$entry" | jq -r '.after')
138140 exit_code=0
139- output=$(uv run pip download "${package}==${after}" --index-url "${{ steps.get-code-artifact-index-url.outputs.index_url } }" --no-deps -d /tmp --quiet 2>&1) || exit_code=$?
141+ output=$(uv run pip download "${package}==${after}" --index-url "${INDEX_URL }" --no-deps -d /tmp --quiet 2>&1) || exit_code=$?
140142 if [[ $exit_code -eq 0 || (
141143 "${output,,}" != *"could not find a version"* &&
142144 "${output,,}" != *"no matching distributions"*
0 commit comments