Skip to content

app-text/gzpaste: new package, add 0.1.1 #2261

app-text/gzpaste: new package, add 0.1.1

app-text/gzpaste: new package, add 0.1.1 #2261

Workflow file for this run

name: emerge
on:
pull_request:
branches:
- master
paths-ignore:
- '.github/**'
- 'metadata/**'
- 'profiles/**'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
scan:
name: scan changed ebuilds
runs-on: ubuntu-latest
outputs:
packages: ${{ steps.packages.outputs.packages }}
steps:
- uses: actions/checkout@v7
- name: scan changed ebuilds
env:
GH_TOKEN: ${{ github.token }}
id: packages
run: |
declare -a packages=()
# new or modifie
for file in $(gh pr view ${{ github.event.pull_request.number }} --json files --jq '.files[] | select(.additions > 0) | .path'); do
if [[ "$file" == *.ebuild ]]; then
packages+=(\=$(echo "$file" | awk -F'/' '{ sub(/\.ebuild$/, "", $3); print $1"/"$3 }'))
else
packages+=($(echo "$file" | awk -F'/' '{print $1"/"$2}'))
fi
done
echo "scan additions files: $(printf '%s\n' "${packages[@]}" | sort -u | jq -R . | jq -s .)"
# treeclean, delete and modifie
for file in $(gh pr view ${{ github.event.pull_request.number }} --json files --jq '.files[] | select(.deletions > 0) | .path'); do
if [ ! -d "$(echo "$file" | awk -F'/' '{print $1"/"$2}')" ]; then
continue
elif [[ "$file" == *.ebuild ]]; then
if [ -f "$file" ]; then
packages+=(\=$(echo "$file" | awk -F'/' '{ sub(/\.ebuild$/, "", $3); print $1"/"$3 }'))
fi
else
packages+=($(echo "$file" | awk -F'/' '{print $1"/"$2}'))
fi
done
echo "scan deletions files: $(printf '%s\n' "${packages[@]}" | sort -u | jq -R . | jq -s .)"
# git mv (without modified)
for file in $(gh pr view ${{ github.event.pull_request.number }} --json files --jq '.files[] | select(.deletions == 0 and .additions == 0) | .path'); do
if [[ "$file" == *.ebuild ]]; then
packages+=(\=$(echo "$file" | awk -F'/' '{ sub(/\.ebuild$/, "", $3); print $1"/"$3 }'))
else
packages+=($(echo "$file" | awk -F'/' '{print $1"/"$2}'))
fi
done
echo "scan non-modified files: $(printf '%s\n' "${packages[@]}" | sort -u | jq -R . | jq -s .)"
declare -a ignore_list=(
.gitignore
AGENTS.md
AUTHORS
COPYING
MIGRATION.md
README.md
README.zh-CN.md
README.zh-TW.md
repo.xml
skel.ChangeLog
skel.metadata.xml
.github
licenses
metadata
profiles
scripts
)
for i in "${ignore_list[@]}"; do
packages=($(printf '%s\n' "${packages[@]}" | grep -v "^$i" || true))
done
echo "scan all files: $(printf '%s\n' "${packages[@]}" | sort -u | jq -R . | jq -s .)"
json_output=$(printf '%s\n' "${packages[@]}" | sort -u | jq -R . | jq -s . | tr -d '\n')
echo "packages=${json_output}" >> "$GITHUB_OUTPUT"
build:
name: emerge
needs: scan
if: ${{ fromJson(needs.scan.outputs.packages)[0] != null }}
strategy:
fail-fast: false
matrix:
package: ${{ fromJSON(needs.scan.outputs.packages) }}
profile:
- amd64-desktop-openrc
- amd64-desktop-systemd
runs-on: ubuntu-latest
container:
image: gentoo/stage3:${{ matrix.profile }}
options: --privileged
steps:
- name: sync gentoo main tree
run: emerge-webrsync
- name: fetch repo
uses: actions/checkout@v7
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.sha }}
- name: setup repo
run: |
mkdir -p /etc/portage/repos.conf
cat > /etc/portage/repos.conf/repo.conf << EOF
[$(cat profiles/repo_name)]
location = $(realpath .)
priority = 0
EOF
- name: setup portage config
run: |
cat >> /etc/portage/make.conf << EOF
FEATURES="\${FEATURES} getbinpkg"
MAKEOPTS="\${MAKEOPTS} -j$(nproc)"
PORTAGE_ELOG_CLASSES="qa warn error"
PORTAGE_ELOG_SYSTEM="save"
EOF
mkdir -p /etc/portage/package.use
cat >> /etc/portage/package.use/ci-binhost << EOF
dev-qt/qtwebengine bindist
EOF
cat /etc/portage/make.conf
- name: setup keyring for binpkgs
run: getuto
- name: setup distfiles permissions
run: |
install -dm775 -o root -g portage /var/cache/distfiles
install -dm775 -o portage -g portage /var/cache/distfiles/git3-src
- name: emerge --onlydeps packages
run: |
emerge --quiet --autounmask=y --autounmask-write=y --autounmask-continue=y --onlydeps ${{ matrix.package }}
rm -rf /var/log/portage/elog/*
- name: emerge packages
run: emerge --verbose --autounmask=y --autounmask-write=y --autounmask-continue=y ${{ matrix.package }}
- name: check Portage elog (fail if exists)
run: |
if ls /var/log/portage/elog/* 1> /dev/null 2>&1; then
echo "❌ Found Portage elog messages:"
cat /var/log/portage/elog/*
exit 1
fi
echo "✅ No elog messages found."