Skip to content

Commit

Permalink
Download also latest dependencies and rename parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
nanory committed Dec 12, 2023
1 parent 42c3f59 commit 855a41c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/build_pkg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ on:
build_profiles:
type: string
default: ""
build_dependencies:
type: string
default: ""
source:
type: string
default: ""
debian_source:
type: string
default: ""
dependencies:
type: string
default: ""
email:
type: string
default: ""
Expand Down Expand Up @@ -70,11 +70,11 @@ jobs:
- name: fetch dependencies
run: |
mkdir _pkgs
while IFS=@ read -r repo tag; do
./scripts/gh_release "${{ github.token }}" "$repo" list "$tag" | grep '\.deb$' | while read -r url; do
while IFS=@ read -r repo reference; do
./scripts/gh_release "${{ github.token }}" "$repo" list "$reference" | grep '\.deb$' | while read -r url; do
(cd _pkgs && wget "$url")
done
done <<< '${{ inputs.dependencies }}'
done <<< '${{ inputs.build_dependencies }}'
ls -lah _pkgs
(cd _pkgs && dpkg-scanpackages --multiversion . > Packages)
cat _pkgs/Packages
Expand Down Expand Up @@ -143,11 +143,11 @@ jobs:
- name: fetch dependencies
run: |
mkdir _pkgs
while IFS=@ read -r repo tag; do
./scripts/gh_release "${{ github.token }}" "$repo" list "$tag" | grep '\.deb$' | while read -r url; do
while IFS=@ read -r repo reference; do
./scripts/gh_release "${{ github.token }}" "$repo" list "$reference" | grep '\.deb$' | while read -r url; do
(cd _pkgs && wget "$url")
done
done <<< '${{ inputs.dependencies }}'
done <<< '${{ inputs.build_dependencies }}'
ls -lah _pkgs
(cd _pkgs && dpkg-scanpackages --multiversion . > Packages)
cat _pkgs/Packages
Expand Down
9 changes: 7 additions & 2 deletions scripts/gh_release
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,13 @@ case "$action" in

;;
"list")
tag="$1"; shift
get "releases/tags/$tag" | jq -r '.assets[] | .browser_download_url'
reference="$1"; shift
if [[ "$reference" == "latest" ]]; then
api_url = "releases/latest"
else
api_url = "releases/tags/$reference"
fi
get "$api_url" | jq -r '.assets[] | .browser_download_url'

;;
"create")
Expand Down

0 comments on commit 855a41c

Please sign in to comment.