Skip to content

Commit

Permalink
set ref for PR
Browse files Browse the repository at this point in the history
  • Loading branch information
ludeeus committed Jul 19, 2024
1 parent 3a5e052 commit beb8858
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
10 changes: 2 additions & 8 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,8 @@ jobs:
uses: actions/[email protected]

- name: Build Container
uses: docker/[email protected]
with:
context: .
file: action/Dockerfile
push: false
tags: hacs/action:local
cache-from: type=gha
cache-to: type=gha,mode=max
run: |
docker build . -t hacs/action:local -f action/Dockerfile
- name: Run Action
run: |
Expand Down
2 changes: 2 additions & 0 deletions action/action.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ async def preflight():
if REPOSITORY and CATEGORY:
repository = REPOSITORY
category = CATEGORY
if event_data.get("pull_request") is not None:
ref = event_data["pull_request"]["head"]["ref"]
elif GITHUB_REPOSITORY == HacsGitHubRepo.DEFAULT:
category = choose_category()
repository = await choose_repository(hacs.githubapi, category)
Expand Down

0 comments on commit beb8858

Please sign in to comment.