Test new actions #35
Workflow file for this run
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
--- | |
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-full | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.head_ref }} | |
- name: Set branch variable | |
run: echo "branchname=${{ github.head_ref }}" >> $GITHUB_ENV | |
- name: Slackware 15.0 vs my -current | |
run: | | |
( 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 ${{ env.branch_name }}'; \ | |
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 ) |