forked from upstream/filebrowser
Beta/v0.5.4 (#397)
Co-authored-by: Anoop Sundaresh <16442416+theryecatcher@users.noreply.github.com>
This commit is contained in:
1 parent
3d51a5af7a
commit
c153a39543
13 files changed
+143
-64
No files matched your search
@@ -50,13 +50,24 @@ jobs:
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: gtstef/filebrowser
|
||||
- name: Modify tags (strip 'v' and add 'beta' if needed)
|
||||
- name: Modify tags (strip 'v' and add 'beta'/'stable' if needed)
|
||||
id: modify-json
|
||||
run: |
|
||||
JSON="${{ steps.meta.outputs.tags }}"
|
||||
# Remove 'v' from version tags
|
||||
JSON=$(echo "$JSON" | sed 's/filebrowser:v/filebrowser:/g')
|
||||
echo "cleaned_tag=$JSON" >> $GITHUB_OUTPUT
|
||||
JSON='${{ steps.meta.outputs.json }}' # Assuming the JSON output is stored in steps.meta.outputs.json
|
||||
|
||||
# Process the JSON array using jq
|
||||
MODIFIED_JSON=$(echo "$JSON" | jq '
|
||||
.tags |= map(sub(":v"; ":")) |
|
||||
if any(.tags[]; test("beta")) then .tags += ["gtstef/filebrowser:beta"] else . end |
|
||||
if any(.tags[]; test("stable")) then .tags += ["gtstef/filebrowser:stable"] else . end
|
||||
')
|
||||
|
||||
# Convert JSON to a comma-separated string for Docker tags
|
||||
TAGS_CSV=$(echo "$MODIFIED_JSON" | jq -r '.tags | join(",")')
|
||||
|
||||
echo "$TAGS_CSV" > modified_tags.txt # Save for debugging
|
||||
echo "cleaned_tag=$TAGS_CSV" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
|
||||
Reference in new issue
Block a user