summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcrystal <crystal@noreply.codeberg.org>2024-04-27 20:52:24 -0600
committercrystal <crystal@noreply.codeberg.org>2024-04-27 20:52:24 -0600
commit1a8f2ec431e65680932152cc5a9f1bf6000f17af (patch)
tree95b96736c880d50e23c659779aad5c729c669910
parent08f545c3661f36af1f4d493408ee6b00ac4bb223 (diff)
[squash] use actions for pr tests
-rwxr-xr-x.ci-make.sh16
-rw-r--r--.forgejo/workflows/forgejo-deb.yml2
2 files changed, 16 insertions, 2 deletions
diff --git a/.ci-make.sh b/.ci-make.sh
index 431cb4f..8356dbc 100755
--- a/.ci-make.sh
+++ b/.ci-make.sh
@@ -77,10 +77,15 @@ case "$1" in
exit 255
;;
"download-binary")
+ if [ "$GITHUB_BASE_REF" ] ; then
+ echo "forgejo actions pull request mode"
+ echo "making sure you didn't break binary builds..."
+ PR_MODE=true
+ fi
if [ "$GITHUB_REF_TYPE" = "tag" ] ; then
echo "INFO: Forgejo Actions mode!"
CI_COMMIT_TAG="$GITHUB_REF_NAME"
- elif [ "$GITHUB_REF_TYPE" = "branch" ] ; then
+ elif [ "$GITHUB_REF_TYPE" = "branch" ] || [ $PR_MODE ] ; then
echo "WARNING: Not building a tag! Simulating it..."
echo "(forgejo actions mode)"
echo "(this will test the binary packaging without cutting a tag in the package)"
@@ -92,6 +97,15 @@ case "$1" in
git describe --tags HEAD
CI_COMMIT_TAG_RESOLVE=$(git describe --tags HEAD --abbrev=0)
echo "Closest existing tag: $CI_COMMIT_TAG_RESOLVE"
+ if [ "$CI_COMMIT_TAG_RESOLVE" = *"-dev" ] ; then
+ if [ $PR_MODE ] ; then
+ echo "I can't figure out which release version of Forgejo to build your PR against."
+ echo "Whatever you're trying to do is not yet implemented."
+ exit 97
+ fi
+ echo "err! building dev version- skipping binary dl"
+ CI_COMMIT_TAG_RESOLVE=
+ fi
fi
cd ..
echo "Proceeding with resolved tag: $CI_COMMIT_TAG_RESOLVE"
diff --git a/.forgejo/workflows/forgejo-deb.yml b/.forgejo/workflows/forgejo-deb.yml
index 5b5ba99..c5f49cb 100644
--- a/.forgejo/workflows/forgejo-deb.yml
+++ b/.forgejo/workflows/forgejo-deb.yml
@@ -1,4 +1,4 @@
-on: [push]
+on: [push, pull_request]
jobs:
build-forgejo-deb:
runs-on: bullseye