测试密钥和变量 #13
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 测试密钥和变量 | |
on: | |
workflow_dispatch: #github页面手动触1发 | |
jobs: | |
get-tags: | |
runs-on: ubuntu-20.04 | |
env: | |
TZ: Asia/Shanghai | |
outputs: | |
tags: ${{ steps.set-output-id.outputs.tags }} | |
steps: | |
- name: 读取变量 | |
id: set-output-id | |
run: | | |
VERSION=bubbles | |
echo "时区:${{ env.TZ }}" | |
echo "版本号:${{ env.DOCKER_IMAGE_NAME }}" | |
- name: 读取密钥 | |
id: set-output-id-2 | |
run: | | |
VERSION=bubbles | |
echo "版本号:${{ secrets.GIT_AUTH_TOKEN }}" | |
- name: 克隆私有仓库代码 | |
id: set-output-id-3 | |
run: | | |
# 设置克隆目录 | |
CLONE_DIR="erpnextcn" | |
git clone https://guinanlin:${{ secrets.GH_TOKEN }}@github.com/guinanlin/erpnextcn.git $CLONE_DIR | |
# 获取当前时间 | |
CURRENT_TIME=$(date "+%Y-%m-%d %H:%M:%S") | |
# 输出克隆目录和完成时间到工作流程日志 | |
echo "克隆目录: $CLONE_DIR" | |
echo "完成时间: $CURRENT_TIME" | |
- uses: actions/checkout@v2 | |
- name: 执行shell脚本 | |
id: set-output-id-4 | |
run: | | |
chmod +x ./.github/scripts/custom.sh | |
./.github/scripts/custom.sh |