Skip to content

Commit

Permalink
Detect debian/ directly instead of use debian_source variables.
Browse files Browse the repository at this point in the history
  • Loading branch information
alee-ntap committed Nov 10, 2023
1 parent bd500a8 commit 02d2efb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/build_pkg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ on:
source_name:
type: string
default: "${{ github.workflow }}"
debian_source:
type: string
default: ""
source_version:
type: string
version_suffix:
Expand All @@ -47,9 +44,9 @@ env:
INPUT_MESSAGE: ${{ inputs.message }}
INPUT_BUILD_OPTIONS: ${{ inputs.build_options }}
INPUT_SOURCE_NAME: ${{ inputs.source_name }}
INPUT_DEBIAN_SOURCE: ${{ inputs.debian_source }}
INPUT_SOURCE_VERSION: ${{ inputs.source_version }}
INPUT_VERSION_SUFFIX: ${{ inputs.version_suffix }}
BRANCH=$(echo ${{ github.workflow_ref }} | cut -d"@" -f2)

jobs:
source:
Expand All @@ -63,7 +60,7 @@ jobs:
- uses: actions/checkout@v4
with:
repository: gardenlinux/package-build
ref: ${{ github.ref_name }}
ref: ${{ env.BRANCH }}
- run: mkdir input output
- uses: actions/checkout@v4
with:
Expand All @@ -74,6 +71,10 @@ jobs:
run: podman pull "${{ inputs.build_container }}:amd64"
- name: fetch dependencies
run: |
echo ${{ github.workflow_ref }}
echo ${GITHUB_REF}
echo ${GITHUB_REF#*/}
echo ${{ github.workflow_sha }}
mkdir _pkgs
while IFS=@ read -r repo tag; do
./scripts/gh_release "${{ github.token }}" "$repo" list "$tag" | grep '\.deb$' | while read -r url; do
Expand All @@ -93,7 +94,6 @@ jobs:
-e MESSAGE='${{ env.INPUT_MESSAGE }}' \
-e BUILD_OPTIONS='${{ env.INPUT_BUILD_OPTIONS }}' \
-e SOURCE_NAME='${{ env.INPUT_SOURCE_NAME }}' \
-e DEBIAN_SOURCE='${{ env.INPUT_DEBIAN_SOURCE }}' \
-e SOURCE_VERSION='${{ env.INPUT_SOURCE_VERSION }}' \
-e VERSION_SUFFIX='${{ env.INPUT_VERSION_SUFFIX }}' \
--rm \
Expand Down
4 changes: 3 additions & 1 deletion container/bin/build_source
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@ main() (
apt_source "$source"
fi

find

# if debian_source defined: remove debian folder from source and replace with debian folder from debian_source
if [ -n "$debian_source" ]; then
if [ -d "$debian_source" ]; then
mkdir debian_src
cd debian_src
if [[ "$debian_source" = "git+"* ]]; then
Expand Down

0 comments on commit 02d2efb

Please sign in to comment.