Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
nkraetzschmar committed Oct 26, 2023
1 parent aafcb28 commit 7cce98d
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
16 changes: 15 additions & 1 deletion .github/workflows/build_pkg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ on:
build_container:
type: string
default: ghcr.io/gardenlinux/package-build/amd64
dependencies:
type: string
default: ""
jobs:
source:
name: source package
Expand All @@ -31,10 +34,21 @@ jobs:
path: input
- name: pull build container
run: podman pull "${{ inputs.build_container }}:amd64"
- name: fetch dependencies
run: |
mkdir pkgs
while IFS=@ read -r repo tag; do
./gh_release "${{ github.token }}" "$repo" list "$tag" | grep '\.deb$' | while read -r url; do
(cd pkgs && wget "$url")
done
done <<< '${{ inputs.dependencies }}'
ls -lah pkgs
dpkg-scanpackages pkgs > pkgs/Packages
cat pkgs/Packages
- name: build
id: build
run: |
pkg="$(podman run --rm -v "$PWD/input:/input" -v "$PWD/output:/output" "${{ inputs.build_container }}:amd64" build_source)"
pkg="$(podman run --rm -v "$PWD/input:/input" -v "$PWD/output:/output" -v "$PWD/pkgs:/pkgs" "${{ inputs.build_container }}:amd64" build_source)"
echo "pkg=$pkg" | tee -a "$GITHUB_OUTPUT"
echo "build_options=$(cat output/.build_options)" | tee -a "$GITHUB_OUTPUT"
- name: check if ${{ env.pkg }} already released
Expand Down
5 changes: 5 additions & 0 deletions gh_release
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ case "$action" in
tag="$1"; shift
get "releases/tags/$tag" > /dev/null

;;
"list")
tag="$1"; shift
get "releases/tags/$tag" | jq -r '.assets[] | .browser_download_url'

;;
"create")
draft=false
Expand Down

0 comments on commit 7cce98d

Please sign in to comment.