Skip to content

Commit

Permalink
even more enhancements
Browse files Browse the repository at this point in the history
  • Loading branch information
khos2ow committed Nov 27, 2024
1 parent b83f9e4 commit 4e03790
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 29 deletions.
11 changes: 8 additions & 3 deletions .github/scripts/ext-debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,13 @@ stage_source() {
debian_version="${full_version%-*}"
cd "$PKG_BUILD_PATH" || exit

echo "Generating source tarball from git repo."
tar --force-local -c -z -v -f "${debian_package_name}_${debian_version}.orig.tar.gz" --exclude .git\* --exclude debian "$PACKAGE_NAME"
# try to download the .orig.tar.gz from existing archive, otherwise build it
scp "[email protected]:/mnt/regolith-archive-volume/packages/$DISTRO/$SUITE/${debian_package_name}/${debian_package_name}_${debian_version}.orig.tar.gz" .

if [ ! -f "${debian_package_name}_${debian_version}.orig.tar.gz" ]; then
echo "Generating source tarball from git repo."
tar --force-local -c -z -v -f "${debian_package_name}_${debian_version}.orig.tar.gz" --exclude .git\* --exclude debian "$PACKAGE_NAME"
fi

popd
}
Expand Down Expand Up @@ -93,7 +98,7 @@ publish() {

cp "$(pwd)/${debian_package_name}_${version}.dsc" "$PKG_PUBLISH_PATH/$DISTRO/$CODENAME/$SUITE"
cp "$(pwd)/${debian_package_name}_${debian_version}.orig.tar.gz" "$PKG_PUBLISH_PATH/$DISTRO/$CODENAME/$SUITE"

if [ -f "$(pwd)/${debian_package_name}_${version}.debian.tar.xz" ]; then
cp "$(pwd)/${debian_package_name}_${version}.debian.tar.xz" "$PKG_PUBLISH_PATH/$DISTRO/$CODENAME/$SUITE"
fi
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-deb-v4.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ jobs:
set -e
mkdir -p ${{ steps.init.outputs.manifest-path }} || true
ssh-keyscan -H 66.175.213.120 >> ~/.ssh/known_hosts
sudo rm -rf /etc/apt/sources.list.d/regolith.list
sudo apt update
DEBIAN_FRONTEND=noninteractive sudo apt install -y --no-install-recommends jq git devscripts wget dput
Expand Down Expand Up @@ -218,8 +220,6 @@ jobs:
set -e
set -x
ssh-keyscan -H 66.175.213.120 >> ~/.ssh/known_hosts
for i in 1 2 3 4 5; do
echo "Attempt $i"
rsync \
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/promote-stage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,17 @@ jobs:
echo "[url \"[email protected]:\"]" >> ~/.gitconfig
echo -e "\tinsteadOf = https://github.com/" >> ~/.gitconfig
if [ "${{ github.event.inputs.dry-run-mode }}" == "push-tags" ]; then
if [ "${{ inputs.dry-run-mode }}" == "push-tags" ]; then
${{ github.workspace }}/.github/scripts/tag-stage.sh \
${{ github.workspace }} \
${{ github.event.inputs.stage-id }} \
${{ github.event.inputs.base-tag-name }} \
${{ github.event.inputs.package-name }}
${{ inputs.stage-id }} \
${{ inputs.base-tag-name }} \
${{ inputs.package-name }}
else
${{ github.workspace }}/.github/scripts/tag-stage.sh \
${{ github.workspace }} \
${{ github.event.inputs.stage-id }} \
${{ github.event.inputs.base-tag-name }} \
${{ github.event.inputs.package-name }} \
${{ inputs.stage-id }} \
${{ inputs.base-tag-name }} \
${{ inputs.package-name }} \
dry-run
fi
12 changes: 6 additions & 6 deletions .github/workflows/purge-pkg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Env Setup
id: init
run: |
echo ::set-output name=s3_bucket::regolith-${{ github.event.inputs.stage }}-${{ github.event.inputs.distro }}-${{ github.event.inputs.codename }}-${{ github.event.inputs.arch }}
echo ::set-output name=s3_bucket::regolith-${{ inputs.stage }}-${{ inputs.distro }}-${{ inputs.codename }}-${{ inputs.arch }}
sudo apt update
sudo apt install -y devscripts reprepro
sudo apt install -y python3-pip
Expand All @@ -50,11 +50,11 @@ jobs:
set -x
export [email protected]
export DEBFULLNAME="Regolith Linux"
pkg_name=${{ github.event.inputs.package }}
distro=${{ github.event.inputs.distro }}
codename=${{ github.event.inputs.codename }}
stage=${{ github.event.inputs.stage }}
arch=${{ github.event.inputs.arch }}
pkg_name=${{ inputs.package }}
distro=${{ inputs.distro }}
codename=${{ inputs.codename }}
stage=${{ inputs.stage }}
arch=${{ inputs.arch }}
sudo chown -R runner generated-repo
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/rebuild-sources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ jobs:
--include="*.debian.tar.xz" \
--include="*.diff.gz" \
--exclude="*" \
[email protected]:${{ github.event.inputs.pull-from }} \
[email protected]:${{ inputs.pull-from }} \
"${{ steps.init.outputs.package-build-path }}"
- name: Rebuild Sources
Expand Down Expand Up @@ -142,5 +142,5 @@ jobs:
rsync \
-avzh \
${{ steps.init.outputs.package-build-path }}/*
[email protected]:${{ github.event.inputs.push-to }} && break || sleep 5
[email protected]:${{ inputs.push-to }} && break || sleep 5
done
18 changes: 9 additions & 9 deletions .github/workflows/test-pkg-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ on:

jobs:
build:
runs-on: ${{ github.event.inputs.build-os-image }}
runs-on: ${{ inputs.build-os-image }}
steps:
- uses: actions/checkout@v4
- name: Environment Setup
Expand All @@ -52,19 +52,19 @@ jobs:
printf "${{ secrets.PACKAGE_PRIVATE_KEY2 }}" | base64 --decode > ~/.gnupg/private.key
gpg --batch --import ~/.gnupg/private.key
- name: Build ${{ github.event.inputs.package-name }} @ ${{ github.event.inputs.package-ref }} for ${{ github.event.inputs.distro }}-${{ github.event.inputs.codename }} (${{ github.event.inputs.stage }})
- name: Build ${{ inputs.package-name }} @ ${{ inputs.package-ref }} for ${{ inputs.distro }}-${{ inputs.codename }} (${{ inputs.stage }})
run: |
set -x
export [email protected]
export DEBFULLNAME="Regolith Linux"
${{ github.workspace }}/.github/scripts/local-build.sh \
--extension ${{ github.workspace }}/.github/scripts/${{ github.event.inputs.extension }} \
--extension ${{ github.workspace }}/.github/scripts/${{ inputs.extension }} \
--git-repo-path "${{ github.workspace }}" \
--package-name ${{ github.event.inputs.package-name }} \
--package-url "${{ github.event.inputs.package-url }}" \
--package-ref "${{ github.event.inputs.package-ref }}" \
--distro "${{ github.event.inputs.distro }}" \
--codename "${{ github.event.inputs.codename }}" \
--stage "${{ github.event.inputs.stage }}"
--package-name ${{ inputs.package-name }} \
--package-url "${{ inputs.package-url }}" \
--package-ref "${{ inputs.package-ref }}" \
--distro "${{ inputs.distro }}" \
--codename "${{ inputs.codename }}" \
--stage "${{ inputs.stage }}"

0 comments on commit 4e03790

Please sign in to comment.