Thứ Tư, 25 tháng 12, 2024

Github workflow: How to checkout the same branch on a workflow that run after another workflow complete

 I have 2 github workflows: CreateRelease and Test. The Test workflow will run after CreateRelease workflow completed. How to make sure that the Test workflow will checkout the same branch with CreateRelease workflow?Use ${{ github.event.workflow_run.head_branch }} in checkout action in Test workflow.Here's CreateRelease workflow:name: CreateReleaseon:  workflow_dispatch:jobs:  ManageVariables:    environment: 'QA Automation'    runs-on: windows-latest    steps:      - uses: actions/checkout@v4        with:          lfs: trueHere's Test workflow:name: Teston:  workflow_run:    workflows: ["CreateRelease"]    types:      - completed ...
Read More »