@@ -27,37 +27,43 @@ jobs:
2727 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
2828 steps :
2929 - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
30+ with :
31+ persist-credentials : false
3032 - name : Fetch Current SHA
3133 shell : bash
3234 run : |
33- if [ -n "${{ github.event.inputs.current-sha } }" ]; then
34- CURRENT_SHA="${{ github.event.inputs.current-sha } }"
35+ if [ -n "${GITHUB_EVENT_INPUTS_CURRENT_SHA }" ]; then
36+ CURRENT_SHA="${GITHUB_EVENT_INPUTS_CURRENT_SHA }"
3537 elif [ -f current-sha.json ]; then
3638 CURRENT_SHA=$(jq -r '.sha' current-sha.json)
3739 else
3840 echo "No current SHA provided and current-sha.json not found."
3941 exit 1
4042 fi
4143 echo "CURRENT_SHA=${CURRENT_SHA}" >> $GITHUB_ENV
44+ env :
45+ GITHUB_EVENT_INPUTS_CURRENT_SHA : ${{ github.event.inputs.current-sha }}
4246 - name : Fetch latest upstream SHA
4347 shell : bash
4448 run : |
45- if [ -n "${{ github.event.inputs.upstream-sha } }" ]; then
46- UPSTREAM_SHA="${{ github.event.inputs.upstream-sha } }"
49+ if [ -n "${GITHUB_EVENT_INPUTS_UPSTREAM_SHA }" ]; then
50+ UPSTREAM_SHA="${GITHUB_EVENT_INPUTS_UPSTREAM_SHA }"
4751 else
4852 UPSTREAM_SHA=$(gh api -X GET repos/chromium/chromium/commits -f path="build/linux/sysroot_scripts" -f per_page=1 --jq '.[0].sha')
4953 fi
5054 echo "UPSTREAM_SHA=${UPSTREAM_SHA}" >> $GITHUB_ENV
55+ env :
56+ GITHUB_EVENT_INPUTS_UPSTREAM_SHA : ${{ github.event.inputs.upstream-sha }}
5157 - name : Compare current SHA with upstream SHA
5258 shell : bash
5359 run : |
54- if [ "${{ env. CURRENT_SHA }} " == "${{ env. UPSTREAM_SHA } }" ]; then
60+ if [ "${CURRENT_SHA} " == "${UPSTREAM_SHA}" ]; then
5561 echo "No changes found - sysroot scripts are up to date!"
5662 else
5763 gh api -X GET repos/chromium/chromium/commits -f path="build/linux/sysroot_scripts" -f per_page=20 > commits.json
5864
5965 COMMITS=$(
60- jq -r --arg base_sha "${{ env. CURRENT_SHA } }" '
66+ jq -r --arg base_sha "${CURRENT_SHA}" '
6167 ([.[].sha] | index($base_sha) // length) as $idx |
6268 .[0:$idx] | .[] |
6369 "- [`\(.sha[0:7])`](\(.html_url)) \(.commit.message | split("\n")[0])"
0 commit comments