mirror of
https://github.com/awalsh128/cache-apt-pkgs-action.git
synced 2025-09-20 10:07:08 +00:00
parent
9b3b2b590c
commit
89bc6bed94
28
action.yml
28
action.yml
|
@ -45,12 +45,17 @@ runs:
|
|||
run: |
|
||||
${GITHUB_ACTION_PATH}/pre_cache_action.sh \
|
||||
~/cache-apt-pkgs \
|
||||
"${{ inputs.version }}" \
|
||||
"${{ inputs.execute_install_scripts }}" \
|
||||
"${{ inputs.debug }}" \
|
||||
${{ inputs.packages }}
|
||||
"$VERSION" \
|
||||
"$EXEC_INSTALL_SCRIPTS" \
|
||||
"$DEBUG" \
|
||||
"$PACKAGES"
|
||||
echo "CACHE_KEY=$(cat ~/cache-apt-pkgs/cache_key.md5)" >> $GITHUB_ENV
|
||||
shell: bash
|
||||
env:
|
||||
VERSION: "${{ inputs.version }}"
|
||||
EXEC_INSTALL_SCRIPTS: "${{ inputs.execute_install_scripts }}"
|
||||
DEBUG: "${{ inputs.debug }}"
|
||||
PACKAGES: "${{ inputs.packages }}"
|
||||
|
||||
- id: load-cache
|
||||
uses: actions/cache@v3
|
||||
|
@ -63,17 +68,22 @@ runs:
|
|||
${GITHUB_ACTION_PATH}/post_cache_action.sh \
|
||||
~/cache-apt-pkgs \
|
||||
/ \
|
||||
"${{ steps.load-cache.outputs.cache-hit }}" \
|
||||
"${{ inputs.execute_install_scripts }}" \
|
||||
"${{ inputs.debug }}" \
|
||||
${{ inputs.packages }}
|
||||
"$CACHE_HIT" \
|
||||
"$EXEC_INSTALL_SCRIPTS" \
|
||||
"$DEBUG" \
|
||||
"$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
|
||||
shell: bash
|
||||
env:
|
||||
CACHE_HIT: "${{ steps.load-cache.outputs.cache-hit }}"
|
||||
EXEC_INSTALL_SCRIPTS: "${{ inputs.execute_install_scripts }}"
|
||||
DEBUG: "${{ inputs.debug }}"
|
||||
PACKAGES: "${{ inputs.packages }}"
|
||||
|
||||
- id: upload-logs
|
||||
if: ${{ inputs.debug }} == "true"
|
||||
if: ${{ inputs.debug == 'true' }}
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: cache-apt-pkgs-logs%${{ inputs.packages }}%${{ inputs.version }}
|
||||
|
|
Loading…
Reference in a new issue