Skip to content

Commit da3c097

Browse files
committed
fix action location variable
1 parent e8c8276 commit da3c097

File tree

1 file changed

+15
-9
lines changed

1 file changed

+15
-9
lines changed

action.yml

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,9 @@ inputs:
4040
default: 'ghcr.io/hhd-dev/rechunk:latest'
4141
keep-ref:
4242
description: |
43-
Disable discarding the original ref after the Ostree commit is created.
44-
May cause storage issues.
43+
By default, this action will remove the ref image provided in `ref`.
44+
This variable will disable discarding it after the OSTree commit is created.
45+
May cause the storage overflow.
4546
4647
outputs:
4748
ref:
@@ -53,6 +54,10 @@ outputs:
5354
description: |
5455
The version of the rechunked image to be used as a tag.
5556
value: ${{ steps.rechunk.outputs.version }}
57+
location:
58+
description: |
59+
The filesystem location of the rechunked image, so that it can be removed.
60+
value: ${{ steps.rechunk.outputs.location }}
5661

5762
runs:
5863
using: 'composite'
@@ -120,12 +125,13 @@ runs:
120125
121126
echo "version=$(sudo cat ${{ github.workspace }}/version.txt)" >> $GITHUB_OUTPUT
122127
echo "ref=oci:${{ github.workspace }}/$OUT_NAME" >> $GITHUB_OUTPUT
123-
echo "output=${{ github.workspace }}/$OUT_NAME" >> $GITHUB_OUTPUT
124-
echo "output_fs=${{ github.workspace }}/$OUT_NAME" >> $GITHUB_OUTPUT
125-
echo "output-fs=${{ github.workspace }}/$OUT_NAME" >> $GITHUB_OUTPUT
128+
echo "location=${{ github.workspace }}/$OUT_NAME" >> $GITHUB_OUTPUT
126129
127-
echo "Github Action output:"
128-
cat $GITHUB_OUTPUT
130+
# Remove root permissions
131+
sudo chmod $(id -u):$(id -g) -R "${{ github.workspace }}/$OUT_NAME"
132+
133+
# Remove cached OSTree volume
134+
sudo podman volume rm cache_ostree
129135
130-
# Remove cached volume
131-
sudo podman volume rm cache_ostree
136+
echo "Github Action output:"
137+
cat $GITHUB_OUTPUT

0 commit comments

Comments
 (0)