-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 79de70a
Showing
7 changed files
with
138 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
--- | ||
|
||
name: main | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
jobs: | ||
# Build job | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
- name: Build | ||
run: ./apt.sh | ||
- name: Upload Pages Artifact | ||
uses: actions/upload-pages-artifact@v2 | ||
with: | ||
path: "public" | ||
|
||
# Deploy job | ||
deploy: | ||
needs: build | ||
|
||
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment | ||
permissions: | ||
pages: write | ||
id-token: write | ||
|
||
# Deploy to the github-pages environment | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
|
||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
Dir { | ||
ArchiveDir "./public/ubuntu"; | ||
CacheDir "./cache"; | ||
}; | ||
Default { | ||
Packages::Extensions ".deb"; | ||
Packages::Compress ". gzip bzip2"; | ||
Sources::Compress ". gzip bzip2"; | ||
Contents::Compress "gzip bzip2"; | ||
}; | ||
|
||
TreeDefault { | ||
BinCacheDB "packages-$(SECTION)-$(ARCH).db"; | ||
Packages "$(DIST)/$(SECTION)/binary-$(ARCH)/Packages"; | ||
SrcDirectory "pool/$(SECTION)"; | ||
Sources "$(DIST)/$(SECTION)/source/Sources"; | ||
Contents "$(DIST)/Contents-$(ARCH)"; | ||
}; | ||
Tree "dists/focal" { | ||
Sections "main"; | ||
Directory "pool/focal/$(SECTION)"; | ||
Architectures "amd64"; | ||
} | ||
Tree "dists/jammy" { | ||
Sections "main"; | ||
Directory "pool/jammy/$(SECTION)"; | ||
Architectures "amd64"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# https://unix.stackexchange.com/a/403489 | ||
# https://gist.github.com/aarroyoc/1a96b2f8b01fcf34221a | ||
# | ||
|
||
set -euo pipefail | ||
|
||
# repos=(kiron1/proxydetox kiron1/bazel-compile-commands) | ||
repos=(kiron1/proxydetox) | ||
machines=(x86_64) | ||
|
||
declare -A aptarch=( ["x86_64"]="amd64" ) | ||
|
||
suits=(focal jammy) | ||
|
||
eval "$(apt-config -c apt-ftparchive.conf shell archive_dir Dir::ArchiveDir/d)" | ||
|
||
mkdir -p "${archive_dir}/pool/main" | ||
|
||
for r in "${repos[@]}"; do | ||
tag=$(gh release view -R "${r}" --json tagName --jq '.tagName') | ||
for s in "${suits[@]}"; do | ||
mkdir -p "${archive_dir}/pool/${s}/main" | ||
rm -f -- "${archive_dir}/pool/${s}/main"/*.deb | ||
for m in "${machines[@]}"; do | ||
printf 'Download %s %s\n' "${r}" "${tag}" | ||
gh release download -R "${r}" "${tag}" --dir "${archive_dir}/pool/${s}/main" --pattern "*-${m}-${s}.deb" --skip-existing | ||
done | ||
find "${archive_dir}/pool/${s}/main/" -name '*.deb' -exec dpkg-name {} + | ||
done | ||
done | ||
|
||
r=kiron1/bazel-compile-commands | ||
tag=$(gh release view -R "${r}" --json tagName --jq '.tagName') | ||
gh release download -R "${r}" "${tag}" --dir "${archive_dir}/pool/focal/main" --pattern "*.deb" --skip-existing | ||
|
||
for s in "${suits[@]}"; do | ||
for m in "${machines[@]}"; do | ||
mkdir -p "${archive_dir}/dists/${s}/main/binary-${aptarch[${m}]}" | ||
done | ||
apt-ftparchive generate apt-ftparchive.conf | ||
apt-ftparchive "-c=${s}.conf" release "${archive_dir}/dists/${s}" > "${archive_dir}/dists/${s}/Release" | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*.db |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
APT::FTPArchive::Release { | ||
Origin "Your origin"; | ||
Label "Your label"; | ||
Suite "focal"; | ||
Codename "focal"; | ||
Architectures "amd64"; | ||
Components "main"; | ||
Description "color to see see"; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
APT::FTPArchive::Release { | ||
Origin "Your origin"; | ||
Label "Your label"; | ||
Suite "jammy"; | ||
Codename "jammy"; | ||
Architectures "amd64"; | ||
Components "main"; | ||
Description "color to see see"; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ubuntu/ |