diff --git a/.forgejo/workflows/integration-nested.yml b/.forgejo/workflows/integration-nested.yml index 4710f50..b03563d 100644 --- a/.forgejo/workflows/integration-nested.yml +++ b/.forgejo/workflows/integration-nested.yml @@ -1,6 +1,6 @@ on: [ push, pull_request ] jobs: - integration: + integration-nested: runs-on: self-hosted steps: - uses: actions/checkout@v3 diff --git a/.forgejo/workflows/integration.yml b/.forgejo/workflows/integration.yml index d10c0ba..bfd4bc5 100644 --- a/.forgejo/workflows/integration.yml +++ b/.forgejo/workflows/integration.yml @@ -7,7 +7,7 @@ env: # Forgejo instance. The test will be a success once the status of # the commit is success, as set by the Forgejo Action run. # - TESTS: 'echo service container expression local-action' + TESTS: 'echo service container expression local-action docker-action' jobs: integration: @@ -18,6 +18,14 @@ jobs: set -x LXC_IP_PREFIX=10.0.10 ./forgejo-dependencies.sh ./forgejo.sh setup root admin1234 codeberg.org/forgejo/forgejo 1.19 + # + # Uncomment the following for a shortcut to debugging the Forgejo runner. + # It will build the runner from a designated repository and branch instead of + # downloading it from a canonical release. + # + #./forgejo-test-helper.sh build_runner http://code.forgejo.org/earl-warren/runner wip-sync + #export PATH=$(pwd)/forgejo-runner:$PATH + # ./forgejo-runner.sh setup export FORGEJO_RUNNER_LOGS=forgejo-runner.log for example in $TESTS ; do diff --git a/README.md b/README.md index ed5c26e..043e615 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ It can only be run on the `self-hosted` platform, running on a host with LXC ins | user | Administrator user name | `false` | root | | password | Administrator password | `false` | admin1234 | | runner | Runner git repository | `false` | https://code.forgejo.org/forgejo/runner | -| runner-version | Runner version | `false` | v2.1.0 | +| runner-version | Runner version | `false` | v2.3.0 | | container | Name of the container running the Forgejo instance | `false` | forgejo | | lxc-ip-prefix | Class C IP prefix used by LXC | `false` | 10.0.23 | diff --git a/action.yml b/action.yml index ec59a35..db98f2e 100644 --- a/action.yml +++ b/action.yml @@ -49,7 +49,7 @@ inputs: default: 'https://code.forgejo.org/forgejo/runner' runner-version: description: 'Runner version' - default: 'v2.1.0' + default: 'v2.3.0' container: description: 'Name of the container running the Forgejo instance' default: 'forgejo' diff --git a/forgejo-runner.sh b/forgejo-runner.sh index 5eabc8d..82966c7 100755 --- a/forgejo-runner.sh +++ b/forgejo-runner.sh @@ -41,7 +41,7 @@ function reload() { function setup() { local runner_repository="${1:-https://code.forgejo.org/forgejo/runner}" - local version="${2:-v2.1.0}" + local version="${2:-v2.3.0}" local forgejo="${3:-http://$(cat forgejo-ip):3000/}" dependencies diff --git a/testdata/example-docker-action/.forgejo/workflows/test.yml b/testdata/example-docker-action/.forgejo/workflows/test.yml new file mode 100644 index 0000000..988a81e --- /dev/null +++ b/testdata/example-docker-action/.forgejo/workflows/test.yml @@ -0,0 +1,19 @@ +on: [push] + +jobs: + ls: + runs-on: docker + steps: + # + # This Docker action creates the file SOMEFILE ... + # + - uses: https://code.forgejo.org/forgejo/test-setup-forgejo-docker@main + with: + args: ${{ github.workspace }}/SOMEFILE + # + # ... which then also exists in the job workspace + # because both docker containers are automatically + # sharing the volume that contains it. + # + - run: | + test -f ${{ github.workspace }}/SOMEFILE