From 6b780077a15230a5bc46fa12e0e47f0b239a315c Mon Sep 17 00:00:00 2001 From: crystal Date: Sun, 28 Apr 2024 08:18:23 -0600 Subject: [PATCH] allow for self-hosted tests --- .action-forgejo-mirror.sh | 6 +----- .forgejo/workflows/forgejo-deb.yml | 4 ++-- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/.action-forgejo-mirror.sh b/.action-forgejo-mirror.sh index 43b1abf..84df16c 100755 --- a/.action-forgejo-mirror.sh +++ b/.action-forgejo-mirror.sh @@ -1,11 +1,7 @@ #!/usr/bin/env bash -if [ "$GITHUB_REPOSITORY_OWNER" = "crystal" ] ; then - echo "crystal_pr: skipping mirror!" - exit 0 -fi git fetch --tags -git remote add action-forgejo-mirror https://forgejo-deb:$FORGEJO_KEY@$FORGEJO_DEST/$GITHUB_REPOSITORY +git remote add action-forgejo-mirror https://action-forgejo-mirror:$FORGEJO_KEY@$FORGEJO_DEST/$GITHUB_REPOSITORY git push action-forgejo-mirror --all git push action-forgejo-mirror --tags "refs/remotes/origin/*:refs/heads/*" git remote remove action-forgejo-mirror diff --git a/.forgejo/workflows/forgejo-deb.yml b/.forgejo/workflows/forgejo-deb.yml index 796677a..1c66728 100644 --- a/.forgejo/workflows/forgejo-deb.yml +++ b/.forgejo/workflows/forgejo-deb.yml @@ -2,7 +2,7 @@ on: [push, pull_request] jobs: mirror: runs-on: bookworm - if: github.event_name == 'push' + if: github.event_name == 'push' && github.repository == 'forgejo-contrib/forgejo-deb' steps: - uses: actions/checkout@v4 with: @@ -193,7 +193,7 @@ jobs: publish-release-repo: runs-on: bookworm - if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') + if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') && github.repository == 'forgejo-contrib/forgejo-deb' steps: - uses: actions/checkout@v4