diff --git a/.github/scripts/ext-debian.sh b/.github/scripts/ext-debian.sh index 730dbf54..e064cf00 100755 --- a/.github/scripts/ext-debian.sh +++ b/.github/scripts/ext-debian.sh @@ -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 "root@66.175.213.120:/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 } @@ -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 diff --git a/.github/workflows/build-deb-v4.yml b/.github/workflows/build-deb-v4.yml index 0c70c1cb..a844b698 100644 --- a/.github/workflows/build-deb-v4.yml +++ b/.github/workflows/build-deb-v4.yml @@ -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 @@ -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 \ diff --git a/.github/workflows/promote-stage.yml b/.github/workflows/promote-stage.yml index 9c275272..9169b69d 100644 --- a/.github/workflows/promote-stage.yml +++ b/.github/workflows/promote-stage.yml @@ -33,17 +33,17 @@ jobs: echo "[url \"git@github.com:\"]" >> ~/.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 diff --git a/.github/workflows/purge-pkg.yml b/.github/workflows/purge-pkg.yml index 533fb830..ce3dd1c0 100644 --- a/.github/workflows/purge-pkg.yml +++ b/.github/workflows/purge-pkg.yml @@ -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 @@ -50,11 +50,11 @@ jobs: set -x export DEBEMAIL=regolith.linux@gmail.com 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 diff --git a/.github/workflows/rebuild-sources.yml b/.github/workflows/rebuild-sources.yml index 5aa884e2..a2c4bad4 100644 --- a/.github/workflows/rebuild-sources.yml +++ b/.github/workflows/rebuild-sources.yml @@ -108,7 +108,7 @@ jobs: --include="*.debian.tar.xz" \ --include="*.diff.gz" \ --exclude="*" \ - root@66.175.213.120:${{ github.event.inputs.pull-from }} \ + root@66.175.213.120:${{ inputs.pull-from }} \ "${{ steps.init.outputs.package-build-path }}" - name: Rebuild Sources @@ -142,5 +142,5 @@ jobs: rsync \ -avzh \ ${{ steps.init.outputs.package-build-path }}/* - root@66.175.213.120:${{ github.event.inputs.push-to }} && break || sleep 5 + root@66.175.213.120:${{ inputs.push-to }} && break || sleep 5 done diff --git a/.github/workflows/test-pkg-build.yml b/.github/workflows/test-pkg-build.yml index ceacd636..f4f9dc50 100644 --- a/.github/workflows/test-pkg-build.yml +++ b/.github/workflows/test-pkg-build.yml @@ -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 @@ -52,7 +52,7 @@ 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 @@ -60,11 +60,11 @@ jobs: 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 }}"