mirror of
https://git.bjxgj.com/xgj/xgj-actions.git
synced 2025-10-14 06:33:37 +08:00
30 lines
840 B
YAML
30 lines
840 B
YAML
name: Config Env Example
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
validate-environment:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: 检出代码
|
|
uses: actions/checkout@v4
|
|
|
|
- name: 校验环境并配置 Git
|
|
id: config-env
|
|
uses: actions/xgj/config-env@v1
|
|
with:
|
|
git-user-name: "CI Bot"
|
|
git-user-email: "ci@example.com"
|
|
require-docker: "true"
|
|
require-kubectl: "true"
|
|
verify-kubectl-cluster: "true"
|
|
kube-config: ${{ secrets.KUBE_CONFIG }}
|
|
|
|
- name: 输出工具信息
|
|
run: |
|
|
echo "Docker 版本: ${{ steps.config-env.outputs.docker-version }}"
|
|
echo "kubectl 版本: ${{ steps.config-env.outputs.kubectl-version }}"
|
|
echo "kubectl 上下文: ${{ steps.config-env.outputs.kubectl-context }}"
|