Skip to content

Rename cicd to cicd.yml #1

Rename cicd to cicd.yml

Rename cicd to cicd.yml #1

Workflow file for this run

name: Run Custom Script
name: cicd

Check failure on line 2 in .github/workflows/cicd.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/cicd.yml

Invalid workflow file

You have an error in your yaml syntax on line 2
on:
workflow_dispatch: # 触发流水线机制 手动触发
inputs:
projectname:
description: '项目名'
required: true
# 开发者维护 具体项目名
default: 'test'
servicename:
description: '服务名'
required: true
# 开发者维护 具体服务名
default: 'test'
type: choice
options:
- a
- b
- c
- d
- e
- f
environment:
description: '部署环境'
required: true
default: test
type: choice
options:
- test
- prod
comment:
description: '发布备注'
required: false
default: 'xxx'
env:
AWS_REGION: ap-southeast-1
ECR_REGISTRY: 024905375334.dkr.ecr.ap-southeast-1.amazonaws.com
CLUSTER_NAME: Cluster Name # EKS集群名
# 环境
ENVIRONMENT: ${{ github.event.inputs.environment }}
# 业务服务参数
PROJECT_NAME: ${{ github.event.inputs.projectname }}
SERVICE_NAME: ${{ github.event.inputs.servicename }}
jobs:
run_script:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Run custom script
run: |
#cd path/to/script/directory
#echo "Hello World!"
# 执行脚本文件
echo ${{ vars.APIFOXPROJECTID}} #仓库的变量
echo ${{ secrets.APITOKEN }} #仓库密钥
echo ${{ vars.TESTSKEY }} # 测试不存在的vars会发生什么
echo ${{ env.PROJECT_ID }}
echo "end"
sudo sh ./hello.sh