Skip to content

Commit

Permalink
Force actions/checkout to use pull request HEAD sha (experiment)
Browse files Browse the repository at this point in the history
  • Loading branch information
nshoes committed Nov 8, 2024
1 parent 6e6ff27 commit a442e2c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches:
- main
tags:
- 'v*'
- "v*"
workflow_dispatch:
pull_request:

Expand All @@ -26,7 +26,7 @@ jobs:
services:
db:
image: postgres:15
ports: ['5432:5432']
ports: ["5432:5432"]
env:
POSTGRES_PASSWORD: postgres
options: >-
Expand Down Expand Up @@ -110,6 +110,8 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}

- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
Expand All @@ -132,7 +134,7 @@ jobs:
type=raw,enable={{is_default_branch}},value=latest
# tag event (eg. "v1.2.3")
type=ref,event=tag
- name: Check if PR publish
if: ${{ github.event_name == 'pull_request' }}
id: pr_publish_check
Expand Down

0 comments on commit a442e2c

Please sign in to comment.