mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-11-03 19:17:13 -05:00 
			
		
		
		
	Change CI ref from merge to head
At this time in the CI, merge is not accessible from tree https://github.community/t/github-sha-but-how-to-get-the-latest-commit-reference-on-a-branch/17160
This commit is contained in:
		
							parent
							
								
									9c3b16c879
								
							
						
					
					
						commit
						eb6153c5aa
					
				
							
								
								
									
										11
									
								
								.github/workflows/ansible.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										11
									
								
								.github/workflows/ansible.yml
									
									
									
									
										vendored
									
									
								
							@ -7,13 +7,20 @@ jobs:
 | 
				
			|||||||
  # https://molecule.readthedocs.io/en/latest/ci.html#github-actions
 | 
					  # https://molecule.readthedocs.io/en/latest/ci.html#github-actions
 | 
				
			||||||
  test:
 | 
					  test:
 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					    runs-on: ubuntu-latest
 | 
				
			||||||
    # https://docs.github.com/en/free-pro-team@latest/actions/reference/context-and-expression-syntax-for-github-actions#github-context
 | 
					 | 
				
			||||||
    if: github.event_name == 'pull_request' || (github.event_name == 'push' && contains(github.ref, 'refs/heads/'))
 | 
					 | 
				
			||||||
    steps:
 | 
					    steps:
 | 
				
			||||||
      - name: Check out the codebase
 | 
					      - name: Check out the codebase
 | 
				
			||||||
        uses: actions/checkout@v2
 | 
					        uses: actions/checkout@v2
 | 
				
			||||||
 | 
					        if: github.event_name != 'pull_request'
 | 
				
			||||||
        with:
 | 
					        with:
 | 
				
			||||||
          path: "${{ github.repository }}"
 | 
					          path: "${{ github.repository }}"
 | 
				
			||||||
 | 
					      - name: Check out the codebase
 | 
				
			||||||
 | 
					        uses: actions/checkout@v2
 | 
				
			||||||
 | 
					        if: github.event_name == 'pull_request'
 | 
				
			||||||
 | 
					        with:
 | 
				
			||||||
 | 
					          # merge commit is not available from tree at this point in time
 | 
				
			||||||
 | 
					          # https://github.com/actions/checkout#checkout-pull-request-head-commit-instead-of-merge-commit
 | 
				
			||||||
 | 
					          ref: "${{ github.event.pull_request.head.sha }}"
 | 
				
			||||||
 | 
					          path: "${{ github.repository }}"
 | 
				
			||||||
      - name: Set up Python
 | 
					      - name: Set up Python
 | 
				
			||||||
        uses: actions/setup-python@v2
 | 
					        uses: actions/setup-python@v2
 | 
				
			||||||
      - name: Set up Docker
 | 
					      - name: Set up Docker
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user