fix: Enhance workflow conditions for E2E tests and deployment processes
This commit is contained in:
@@ -8,7 +8,19 @@ on:
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
if: ${{ github.event_name != 'workflow_run' || (github.event.workflow_run.conclusion == 'success' && (github.event.workflow_run.head_branch == 'main' || github.event.workflow_run.head_branch == 'refs/heads/main')) }}
|
||||
if: ${{ github.event_name != 'workflow_run' || (
|
||||
github.event.workflow_run.conclusion == 'success' && (
|
||||
github.event.workflow_run.head_branch == 'main' ||
|
||||
github.event.workflow_run.head_branch == 'refs/heads/main' ||
|
||||
(
|
||||
!github.event.workflow_run.head_branch && (
|
||||
github.event.workflow_run.repository.default_branch == 'main' ||
|
||||
github.event.workflow_run.repository.default_branch == 'refs/heads/main' ||
|
||||
github.event.repository.default_branch == 'main' ||
|
||||
github.event.repository.default_branch == 'refs/heads/main'
|
||||
)
|
||||
)
|
||||
) }}
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
DEFAULT_BRANCH: main
|
||||
@@ -19,6 +31,8 @@ jobs:
|
||||
REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }}
|
||||
WORKFLOW_RUN_HEAD_BRANCH: ${{ github.event.workflow_run.head_branch }}
|
||||
WORKFLOW_RUN_HEAD_SHA: ${{ github.event.workflow_run.head_sha }}
|
||||
WORKFLOW_RUN_REPO_DEFAULT_BRANCH: ${{ github.event.workflow_run.repository.default_branch }}
|
||||
REPOSITORY_DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
|
||||
steps:
|
||||
- name: SSH and deploy
|
||||
uses: appleboy/ssh-action@master
|
||||
|
||||
Reference in New Issue
Block a user