From da3c0977ed4d1cb5ac15968e30938c0ce39dcbfa Mon Sep 17 00:00:00 2001 From: Antheas Kapenekakis Date: Wed, 31 Jul 2024 14:09:00 +0300 Subject: [PATCH] fix action location variable --- action.yml | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/action.yml b/action.yml index 9686370..d6b6b82 100644 --- a/action.yml +++ b/action.yml @@ -40,8 +40,9 @@ inputs: default: 'ghcr.io/hhd-dev/rechunk:latest' keep-ref: description: | - Disable discarding the original ref after the Ostree commit is created. - May cause storage issues. + By default, this action will remove the ref image provided in `ref`. + This variable will disable discarding it after the OSTree commit is created. + May cause the storage overflow. outputs: ref: @@ -53,6 +54,10 @@ outputs: description: | The version of the rechunked image to be used as a tag. value: ${{ steps.rechunk.outputs.version }} + location: + description: | + The filesystem location of the rechunked image, so that it can be removed. + value: ${{ steps.rechunk.outputs.location }} runs: using: 'composite' @@ -120,12 +125,13 @@ runs: echo "version=$(sudo cat ${{ github.workspace }}/version.txt)" >> $GITHUB_OUTPUT echo "ref=oci:${{ github.workspace }}/$OUT_NAME" >> $GITHUB_OUTPUT - echo "output=${{ github.workspace }}/$OUT_NAME" >> $GITHUB_OUTPUT - echo "output_fs=${{ github.workspace }}/$OUT_NAME" >> $GITHUB_OUTPUT - echo "output-fs=${{ github.workspace }}/$OUT_NAME" >> $GITHUB_OUTPUT + echo "location=${{ github.workspace }}/$OUT_NAME" >> $GITHUB_OUTPUT - echo "Github Action output:" - cat $GITHUB_OUTPUT + # Remove root permissions + sudo chmod $(id -u):$(id -g) -R "${{ github.workspace }}/$OUT_NAME" + + # Remove cached OSTree volume + sudo podman volume rm cache_ostree - # Remove cached volume - sudo podman volume rm cache_ostree \ No newline at end of file + echo "Github Action output:" + cat $GITHUB_OUTPUT \ No newline at end of file