mirror of
https://github.com/termux-pacman/termux-packages.git
synced 2026-01-06 02:43:23 +00:00
Update packages.yml
This commit is contained in:
32
.github/workflows/packages.yml
vendored
32
.github/workflows/packages.yml
vendored
@@ -46,12 +46,12 @@ jobs:
|
||||
echo "Processing pull request #$(jq --raw-output .pull_request.number "$GITHUB_EVENT_PATH"): ${BASE_COMMIT}..HEAD"
|
||||
CHANGED_FILES=$(git diff-tree --no-commit-id --name-only -r "${BASE_COMMIT}" "HEAD")
|
||||
fi
|
||||
mkdir -p ./artifacts ./debs
|
||||
touch ./debs/.placeholder
|
||||
mkdir -p ./artifacts ./output
|
||||
touch ./output/.placeholder
|
||||
# Process tag '%ci:no-build' that may be added as line to commit message.
|
||||
# Forces CI to cancel current build with status 'passed'.
|
||||
if grep -qiP '^\s*%ci:no-build\s*$' <(git log --format="%B" -n 1 "HEAD"); then
|
||||
tar cf artifacts/debs-${{ matrix.target_arch }}.tar debs
|
||||
tar cf artifacts/output-${{ matrix.target_arch }}.tar output
|
||||
echo "[!] Force exiting as tag '%ci:no-build' was applied to HEAD commit message."
|
||||
exit 0
|
||||
fi
|
||||
@@ -118,23 +118,23 @@ jobs:
|
||||
|
||||
if [ -f ./built_packages.txt ]; then
|
||||
./scripts/lint-packages.sh $(cat ./built_packages.txt | awk '{print "packages/"$1"/build.sh"}')
|
||||
./scripts/run-docker.sh ./build-package.sh -o ./debs -I -a ${{ matrix.target_arch }} $(cat ./built_packages.txt)
|
||||
./scripts/run-docker.sh ./build-package.sh --format pacman -I -a ${{ matrix.target_arch }} $(cat ./built_packages.txt)
|
||||
fi
|
||||
|
||||
test -d ./termux-packages/debs && mv ./termux-packages/debs/* ./debs/
|
||||
# Put package lists into directory with *.deb files so they will be transferred to
|
||||
test -d ./termux-packages/output && mv ./termux-packages/output/* ./output/
|
||||
# Put package lists into directory with *.pkg.tar.xz files so they will be transferred to
|
||||
# upload job.
|
||||
test -f ./built_packages.txt && mv ./built_packages.txt ./debs/
|
||||
test -f ./built_subpackages.txt && cat ./built_subpackages.txt >> ./debs/built_packages.txt \
|
||||
test -f ./built_packages.txt && mv ./built_packages.txt ./output/
|
||||
test -f ./built_subpackages.txt && cat ./built_subpackages.txt >> ./output/built_packages.txt \
|
||||
&& rm ./built_subpackages.txt
|
||||
test -f ./deleted_packages.txt && mv ./deleted_packages.txt ./debs/
|
||||
test -f ./deleted_packages.txt && mv ./deleted_packages.txt ./output/
|
||||
# Files containing certain symbols (e.g. ":") will cause failure in actions/upload-artifact.
|
||||
# Archiving *.deb files in a tarball to avoid issues with uploading.
|
||||
tar cf artifacts/debs-${{ matrix.target_arch }}-${{ github.sha }}.tar debs
|
||||
- name: Checksums for built *.deb files
|
||||
# Archiving *.pkg.tar.xz files in a tarball to avoid issues with uploading.
|
||||
tar cf artifacts/output-${{ matrix.target_arch }}-${{ github.sha }}.tar output
|
||||
- name: Checksums for built *.pkg.tar.xz files
|
||||
run: |
|
||||
find debs -type f -name "*.deb" -exec sha256sum "{}" \; | sort -k2
|
||||
- name: Store *.deb files
|
||||
find output -type f -name "*.pkg.tar.xz" -exec sha256sum "{}" \; | sort -k2
|
||||
- name: Store *.pkg.tar.xz files
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: termux-packages-${{ github.sha }}
|
||||
@@ -146,7 +146,7 @@ jobs:
|
||||
steps:
|
||||
- name: Clone repository
|
||||
uses: actions/checkout@v2
|
||||
- name: Get *.deb files
|
||||
- name: Get *.pkg.tar.xz files
|
||||
uses: actions/download-artifact@v2
|
||||
with:
|
||||
name: termux-packages-${{ github.sha }}
|
||||
@@ -184,7 +184,7 @@ jobs:
|
||||
# Upload file to temporary directory.
|
||||
uploaded_files=false
|
||||
shopt -s nullglob
|
||||
for filename in $(cat debs/built_packages.txt | sed -E 's/(..*)/debs\/\1_\*.deb debs\/\1-static_\*.deb/g'); do
|
||||
for filename in $(cat output/built_packages.txt | sed -E 's/(..*)/output\/\1_\*.pkg.tar.xz output\/\1-static_\*.pkg.tar.xz/g'); do
|
||||
curl_response=$(
|
||||
curl \
|
||||
--silent \
|
||||
|
||||
Reference in New Issue
Block a user