From f608518e87840a31ae29949a1d44fd2a71532223 Mon Sep 17 00:00:00 2001 From: Earl Warren Date: Sat, 25 Mar 2023 16:57:11 +0100 Subject: [PATCH] push self --- action.yml | 3 +++ testdata/run.sh | 5 +++-- testdata/setup-forgejo.yml | 9 +++++++++ 3 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 testdata/setup-forgejo.yml diff --git a/action.yml b/action.yml index 6f6ee6b..d895eab 100644 --- a/action.yml +++ b/action.yml @@ -13,6 +13,9 @@ runs: steps: - run: | set -x + echo HHHHHHHHHHHHHHHHHHHHHHHHHHHHHH + pwd + exit 0 echo deb http://deb.debian.org/debian bullseye-backports main | tee /etc/apt/sources.list.d/backports.list && apt-get update DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends --quiet -y -t bullseye-backports git docker.io ./forgejo.sh setup root admin1234 codeberg.org/forgejo/forgejo:1.19 diff --git a/testdata/run.sh b/testdata/run.sh index 5cff054..c3fb5eb 100755 --- a/testdata/run.sh +++ b/testdata/run.sh @@ -41,7 +41,8 @@ function push() { local dir="$DIR/$workflow" mkdir -p $dir/.forgejo/workflows - cp $DATA/$workflow.yml $dir/.forgejo/workflows + sed -e "s|SELF|$forgejo/$owner|" \ + < $DATA/$workflow.yml > $dir/.forgejo/workflows/$workflow.yml ( cd $dir git init @@ -81,7 +82,7 @@ function push_self() { git config user.email root@example.com git config user.name username git commit -m 'avoid workflow infinite recursion' - git push origin fortesting:main + git push --force origin fortesting:main ) } diff --git a/testdata/setup-forgejo.yml b/testdata/setup-forgejo.yml new file mode 100644 index 0000000..b81ca82 --- /dev/null +++ b/testdata/setup-forgejo.yml @@ -0,0 +1,9 @@ +name: Setup Forgejo +run-name: ${{ github.actor }} is setting up Forgejo +on: [push] +jobs: + setup-forgejo: + runs-on: self-hosted + steps: + - uses: actions/checkout@v3 + - uses: SELF/setup-forgejo@v1