example-service: only one workflow to avoid breakage

This commit is contained in:
Earl Warren 2023-10-07 23:51:05 +02:00
parent fccbd1ce6b
commit 7243566bce
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00
2 changed files with 21 additions and 19 deletions

View file

@ -1,19 +0,0 @@
on: [push]
jobs:
test:
runs-on: docker
container:
image: code.forgejo.org/oci/debian:bookworm
services:
pgsql:
image: code.forgejo.org/oci/postgres:15
env:
POSTGRES_DB: test
POSTGRES_PASSWORD: postgres
steps:
- run: |
apt-get update -qq
apt-get install -y -qq postgresql-client
PGPASSWORD=postgres psql -h pgsql -U postgres -c '\dt' test

View file

@ -2,9 +2,29 @@ on: [push]
jobs: jobs:
# #
# No volume involved
#
simple:
runs-on: docker
container:
image: code.forgejo.org/oci/debian:bookworm
services:
pgsql:
image: code.forgejo.org/oci/postgres:15
env:
POSTGRES_DB: test
POSTGRES_PASSWORD: postgres
steps:
- run: |
apt-get update -qq
apt-get install -y -qq postgresql-client
PGPASSWORD=postgres psql -h pgsql -U postgres -c '\dt' test
#
# A --volume option will expose the volume from the docker host to the job # A --volume option will expose the volume from the docker host to the job
# #
volume-on-step: volume-on-step:
needs: [simple]
runs-on: docker runs-on: docker
container: container:
image: code.forgejo.org/oci/debian:bookworm image: code.forgejo.org/oci/debian:bookworm
@ -19,6 +39,7 @@ jobs:
# A --volume option will expose the volume from the docker host to the service # A --volume option will expose the volume from the docker host to the service
# #
volume-on-service: volume-on-service:
needs: [volume-on-step]
runs-on: docker runs-on: docker
container: container:
image: code.forgejo.org/oci/debian:bookworm image: code.forgejo.org/oci/debian:bookworm