Skip to content

测试密钥和变量 #11

测试密钥和变量

测试密钥和变量 #11

Workflow file for this run

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"
- name: 执行shell脚本
id: set-output-id-4
run: |
chmod +x ./.github/scripts/custom.sh
./.github/scripts/custom.sh