1
0
Fork 0
mirror of https://code.forgejo.org/actions/setup-forgejo synced 2024-09-19 01:46:16 +00:00

add the docker-action example & test

Refs: https://code.forgejo.org/forgejo/runner/issues/49
This commit is contained in:
Earl Warren 2023-07-12 12:52:29 +02:00
parent a4f74efef4
commit 4fcf694434
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00
3 changed files with 29 additions and 2 deletions

View file

@ -1,6 +1,6 @@
on: [ push, pull_request ]
jobs:
integration:
integration-nested:
runs-on: self-hosted
steps:
- uses: actions/checkout@v3

View file

@ -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

View file

@ -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