Skip to content

Commit

Permalink
fix update repo commands
Browse files Browse the repository at this point in the history
  • Loading branch information
storybehind committed Aug 6, 2024
1 parent 3d45dd3 commit bfe197d
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 16 deletions.
33 changes: 20 additions & 13 deletions .github/workflows/distribute-zboxcli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -186,28 +186,35 @@ jobs:

- name: Copy debian packages
run : |
mkdir -p ${{ env.REPO_DIR }}/pool/main/z/${APP_NAME}/
mkdir -p ${{ env.REPO_DIR }}/pool/main/z/${{ env.APP_NAME }}/
find ${{ env.DEB_DIR }} -name "*.deb"
for deb in $(find ${{ env.DEB_DIR }} -name "*.deb"); do
cp $deb ${{ env.REPO_DIR }}/pool/main/z/${APP_NAME}/
cp $deb ${{ env.REPO_DIR }}/pool/main/z/${{ env.APP_NAME }}/
done
- name: Update APT repo
run: |
cd ${{ env.REPO_DIR }}
for dist in ${{ env.DISTRIBUTIONS }}; do
mkdir -p dists/${dist}
for arch in ${{ env.ARCHITECTURES }}; do
mkdir -p dists/${dist}/main/binary-${arch}
find "${{ env.REPO_DIR }}/pool/main/z/${{ env.APP_NAME }}" -type f -name "${{ env.APP_NAME }}_*~${dist}_${arch}.deb" | \
xargs -I {} apt-ftparchive -o Tree::dists/${dist}::Sections="main" \
-o Tree::dists/${dist}::Architectures="${arch}" \
-o Dir::ArchiveDir="${{ env.REPO_DIR }}" \
packages {} > dists/${dist}/main/binary-${arch}/Packages
done
apt-ftparchive -o APT::FTPArchive::Release::Origin="${{ env.APP_NAME }}" \
-o APT::FTPArchive::Release::Label="${{ env.APP_NAME }}" \
-o APT::FTPArchive::Release::Suite="${dist}" \
-o APT::FTPArchive::Release::Codename="${dist}" \
-o APT::FTPArchive::Release::Version="${{ env.APP_VERSION }}" \
-o APT::FTPArchive::Release::Architectures="${{ env.ARCHITECTURES }}" \
-o APT::FTPArchive::Release::Components="main" \
-o Tree::dists/${dist}::Sections="main" \
-o Tree::dists/${dist}::Architectures="${{ env.ARCHITECTURES }}" \
-o Dir::ArchiveDir="${{ env.REPO_DIR }}" \
packages pool/main override-file \
release dists/${dist}
-o APT::FTPArchive::Release::Label="${{ env.APP_NAME }}" \
-o APT::FTPArchive::Release::Suite="${dist}" \
-o APT::FTPArchive::Release::Codename="${dist}" \
-o APT::FTPArchive::Release::Version="${{ env.APP_VERSION }}" \
-o APT::FTPArchive::Release::Architectures="${{ env.ARCHITECTURES }}" \
-o APT::FTPArchive::Release::Components="main" \
-o Dir::ArchiveDir="${{ env.REPO_DIR }}" \
release dists/${dist} > dists/${dist}/Release
echo "${{ secrets.GPG_PASSPHRASE }}" | gpg --default-key ${{ secrets.GPG_KEY_ID }} --batch --yes --passphrase-fd 0 -abs -o dists/${dist}/Release.gpg dists/${dist}/Release
echo "${{ secrets.GPG_PASSPHRASE }}" | gpg --default-key ${{ secrets.GPG_KEY_ID }} --batch --yes --passphrase-fd 0 --clearsign -o dists/${dist}/InRelease dists/${dist}/Release
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Release
on:
push: # remove push once tested
push: # REMOVE: push once tested
branches:
- packaging
workflow_dispatch:
Expand All @@ -12,7 +12,7 @@ on:

env:
GITHUB_TOKEN: ${{ secrets.GOSDK }}
VERSION: 1.16.0 # take as input from workflow
VERSION: 1.16.0 # REMOVE: take as input from workflow
APP_NAME: zbox
GO_VERSION: 1.21

Expand Down
2 changes: 1 addition & 1 deletion scripts/debian/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ Signed-by: /etc/apt/keyrings/zus.gpg" | tee /etc/apt/sources.list.d/zbox.sources
touch $CONFIG_PATH
cat <<EOT > ${CONFIG_PATH}
---
block_worker: https://dev.zus.network
block_worker: https://dev.zus.network # UPDATE: mainnet url
signature_scheme: bls0chain
min_submit: 50
min_confirmation: 50
Expand Down

0 comments on commit bfe197d

Please sign in to comment.