.gitea/workflows/services.yml aktualisiert
Test Workflow run in Container / test (push) Successful in 18s
Test Gitea Actions with Service Containers / build (push) Successful in 1m14s

This commit is contained in:
2023-07-27 02:47:20 +02:00
parent db65c4ab7e
commit dfa0d502d3
+7 -1
View File
@@ -3,7 +3,8 @@ on: push
env:
# Global Env Variables readable in all jobs of this workflow
MONGODB_CLUSTER_ADDRESS: mongodb
MONGODB_CLUSTER_ADDRESS: mongodb # The network alias name of the mongodb docker service container
# Env Variables which the Example JS App will access
MONGODB_USERNAME: root
MONGODB_PASSWORD: supersecretpassword
MONGODB_DB_NAME: actionsenvironment
@@ -11,12 +12,17 @@ env:
jobs:
build:
# Job will execute the Steps inside a 'node:latest' docker container
container:
image: node:latest
runs-on: ubuntu-latest
services:
# Before running the Steps of this job...
# The runner will spawm a second container 'mongodb' using the mongo:latest image with some db settings
# The node container and the mongodb container will be in a new temporary docker bridge network
mongodb:
image: mongo:latest
# Docker related container env Variables for the mongo image (JS App will not have these variables)
env:
MONGO_INITDB_DATABASE: actionsenvironment
MONGO_INITDB_ROOT_USERNAME: root