dotnet-deploy-k8s/.gitea/workflows/deploy-main-demo.yaml
MYJ dcb27094fe
All checks were successful
deploy to dev / Explore-Gitea-Actions (push) Successful in 2s
deploy to main / Explore-Gitea-Actions (pull_request) Successful in 1s
8
2025-02-26 21:29:46 +08:00

21 lines
616 B
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

name: deploy to main
on:
pull_request:
branches:
- main
jobs:
Explore-Gitea-Actions:
runs-on: home
steps:
- name: 输出事件信息
run: echo "event_name=${{ gitea.event_name }}merged=${{ gitea.event.pull_request.merged }}gitea.ref=${{ gitea.ref }}"
- name: 部署到测试环境dev
if: ${{ gitea.ref == 'refs/heads/dev' }}
run: echo "dev"
- name: 部署到生产环境main
if: ${{ gitea.event_name == 'pull_request' && gitea.event.pull_request.merged == true && gitea.ref == 'refs/heads/main' }}
run: echo "main"