This commit is contained in:
MYJ 2025-02-26 21:20:41 +08:00
parent b98db8dcc7
commit 037058e937
2 changed files with 6 additions and 2 deletions

View File

@ -12,4 +12,6 @@ jobs:
- run: echo "event_name=${{ gitea.event_name }}merged=${{ gitea.event.pull_request.merged }}gitea.ref=${{ gitea.ref }}"
- name: 部署到测试环境
if: ${{ gitea.ref == 'refs/heads/dev' }}
run: echo "dev"
run: echo "dev"
if: ${{ gitea.ref == 'refs/heads/main' }}
run: echo "main"

View File

@ -12,4 +12,6 @@ jobs:
- run: echo "event_name=${{ gitea.event_name }}merged=${{ gitea.event.pull_request.merged }}gitea.ref=${{ gitea.ref }}"
- name: 部署到生产环境
if: ${{ gitea.event_name == 'pull_request' && gitea.event.pull_request.merged == true && gitea.ref == 'refs/heads/main' }}
run: echo "prod"
run: echo "main"
if: ${{ gitea.ref == 'refs/heads/dev' }}
run: echo "dev"