Only upload deb files to release

This commit is contained in:
Daniel A. Wozniak 2024-12-19 14:23:04 -07:00 committed by Daniel Wozniak
parent 13f0d59587
commit 06fdd0a895
2 changed files with 10 additions and 1 deletions

View file

@ -85,6 +85,7 @@ jobs:
with:
name: salt-${{ inputs.salt-version }}-${{ matrix.arch }}-deb
upload_url: ${{ needs.create-github-release.outputs.upload_url }}
pattern: "*.deb"
upload-rpm-packages:
needs:

View file

@ -12,6 +12,10 @@ on:
type: string
required: true
description: Release's upload url.
pattern:
type: string
required: false
description: Pattern of files to upload
jobs:
@ -29,7 +33,11 @@ jobs:
- run: find artifacts -maxdepth 1 -type f -printf '%f\n'
- id: list-files
run: |
echo files="$(find artifacts -maxdepth 1 -type f -printf '%f\n' | jq -Rnc '[inputs | { file: "\(.)" }]')" >> "$GITHUB_OUTPUT"
if [ "${{ inputs.pattern }}" != "" ]; then
echo files="$(find artifacts -maxdepth 1 -type f -name '${{ inputs.pattern }}' -printf '%f\n' | jq -Rnc '[inputs | { file: "\(.)" }]')" >> "$GITHUB_OUTPUT"
else
echo files="$(find artifacts -maxdepth 1 -type f -printf '%f\n' | jq -Rnc '[inputs | { file: "\(.)" }]')" >> "$GITHUB_OUTPUT"
fi
upload-files:
name: Upload ${{ matrix.file }} from ${{ inputs.name }}