Skip to content

Test new actions

Test new actions #37

Workflow file for this run

---
name: PR tests
on:
pull_request_target:
branches:
- current
types:
- opened
- synchronize
- reopened
jobs:
Build:
name: "Build against Slackware 15"
runs-on: ubuntu-22.04
container:
image: aclemons/slackware:latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
ref: ${{ github.ref }}
- name: Slackware 15.0 vs my -current
run: |
( echo "${{ github.ref }}"
branchname=$(echo ${{ github.ref }} | sed 's/^refs\/heads\///')
cd /tmp
COMMIT=${COMMIT:-b721b4f35e06ece50888965af5a7642013de58a2}
mkdir init && cd init
wget -c https://raw.githubusercontent.com/RSKYS/SBo-git/$COMMIT/system/sbotools/sbotools.SlackBuild \
https://raw.githubusercontent.com/RSKYS/SBo-git/$COMMIT/system/sbotools/sbotools.info \
https://raw.githubusercontent.com/RSKYS/SBo-git/$COMMIT/system/sbotools/slack-desc \
https://raw.githubusercontent.com/RSKYS/SBo-git/$COMMIT/system/sbotools/req.diff \
https://raw.githubusercontent.com/RSKYS/SBo-git/$COMMIT/system/sbotools/README
export $( cat sbotools.info | \
grep -E "VERSION=|DOWNLOAD=" | tr -d "\"" )
wget $DOWNLOAD
python3 -c "import re; \
path = 'req.diff'; f = open(path, 'r'); \
content = f.read(); f.close(); \
pattern = r\"clone -b master\"; \
replace = r\"clone -b $branchname\"; \
newvar = re.sub(pattern, replace, content); \
f = open(path, 'w'); f.write(newvar); f.close();"
TAG=red PKGTYPE=txz sh sbotools.SlackBuild
upgradepkg --reinstall --install-new /tmp/sbotools-$VERSION*.t?z
rm -rf {.git*,*}
sbosnap fetch )
( cd /tmp/sbo/repo
CHANGED=$(git diff --name-only remotes/origin/current.. | grep '.SlackBuild')
find */*/ -name "doinst.sh" -exec sed -e '1,$d' {} +
for FILE in $CHANGED; do
BASENAME=$(basename $FILE .SlackBuild)
PKGTYPE=txz \
sboinstall -j3 --reinstall $BASENAME
done )