github - 如何从 bash 命令分配环境变量
问题描述
我有一个包含所有环境变量的配置文件,而不是手动分配每个环境变量,我想使用 bash 从我的文件中读取
name: Integration
on: [push]
jobs:
tests:
runs-on: ubuntu-latest
services:
mysql:
image: mysql:8
env:
MYSQL_DATABASE: $(value from bash script)
我见过的所有指南都只展示了如何使用预定义的环境变量,而没有使用动态值
解决方案
推荐阅读
- django - django cache_page 如何过期?
- ruby-on-rails - 定位新的 postgres 数据库 (rails)
- python-3.x - 试图从父类继承变量“NameError: name 'r' is not defined”
- excel - 如何按索引位置返回数组中的元素值?
- arrays - 将 1,2 字符串转换为数组 [1, 2]
- ios - 使用 iOS 设置 TCP_QUICKACK
- php - 如何使用Jquery从输入类型=文件中的mysql数据库传递一个值?
- python - Python - POST 请求时拒绝访问 403
- xml - xslt 2.0:无法从 xml 中选择多个值
- r - 如何绕过使用不同日期的重复函数?