Skip to content

Commit

Permalink
Make cache env variable name unique.
Browse files Browse the repository at this point in the history
  • Loading branch information
awalsh128 committed Mar 3, 2024
1 parent b40d864 commit e2a050e
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ runs:
run: |
${GITHUB_ACTION_PATH}/pre_cache_action.sh \
~/cache-apt-pkgs \
"$VERSION" \
"$EXEC_INSTALL_SCRIPTS" \
"$DEBUG" \
"$PACKAGES"
echo "CACHE_KEY=$(cat ~/cache-apt-pkgs/cache_key.md5)" >> $GITHUB_ENV
"${{ inputs.version }}" \
"${{ inputs.execute_install_scripts }}" \
"${{ inputs.debug }}" \
${{ inputs.packages }}
echo "CACHE_APT_PKGS_ACTION_CACHE_KEY=$(cat ~/cache-apt-pkgs/cache_key.md5)" >> $GITHUB_ENV
shell: bash
env:
VERSION: "${{ inputs.version }}"
Expand All @@ -62,17 +62,17 @@ runs:
uses: actions/cache/restore@v4
with:
path: ~/cache-apt-pkgs
key: cache-apt-pkgs_${{ env.CACHE_KEY }}
key: cache-apt-pkgs_${{ env.CACHE_APT_PKGS_ACTION_CACHE_KEY }}

- id: post-cache
run: |
${GITHUB_ACTION_PATH}/post_cache_action.sh \
~/cache-apt-pkgs \
/ \
"$CACHE_HIT" \
"$EXEC_INSTALL_SCRIPTS" \
"$DEBUG" \
"$PACKAGES"
"${{ inputs.version }}" \
"${{ inputs.execute_install_scripts }}" \
"${{ inputs.debug }}" \
${{ inputs.packages }}
function create_list { local list=$(cat ~/cache-apt-pkgs/manifest_${1}.log | tr '\n' ','); echo ${list:0:-1}; };
echo "package-version-list=$(create_list main)" >> $GITHUB_OUTPUT
echo "all-package-version-list=$(create_list all)" >> $GITHUB_OUTPUT
Expand All @@ -87,7 +87,7 @@ runs:
#if: ${{ inputs.debug == 'true' }}
uses: actions/upload-artifact@v3
with:
name: cache-apt-pkgs-logs_${{ env.CACHE_KEY }}
name: cache-apt-pkgs-logs_${{ env.CACHE_APT_PKGS_ACTION_CACHE_KEY }}
path: ~/cache-apt-pkgs/*.log

- id: save-cache
Expand Down

0 comments on commit e2a050e

Please sign in to comment.