forked from frappe/frappe_docker
-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (41 loc) · 1.4 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: 测试密钥和变量
on:
workflow_dispatch: #github页面手动触1发
jobs:
get-tags:
runs-on: ubuntu-20.04
env:
TZ: Asia/Shanghai
GIT_AUTH_TOKEN: ${{ secrets.GIT_AUTH_TOKEN }}
APP_ID: ${{ vars.APP_ID }}
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