Skip to content

Commit 469894f

Browse files
committed
Get GH branch name from env
1 parent 822fafd commit 469894f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

.github/workflows/has-valid-blueprint-json.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ jobs:
77
check_blueprints:
88
runs-on: ubuntu-latest
99

10+
env:
11+
GITHUB_BRANCH: ${{ github.ref }}
12+
1013
steps:
1114
- name: Checkout code
1215
uses: actions/checkout@v2
13-
with:
14-
ref: ${{ github.ref }}
15-
fetch-depth: 0
1616

1717
- name: Fetch trunk
1818
run: |

validate_pr.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def validate_blueprints():
4949

5050
# Check if the URLs all point to raw.githubusercontent.com/adamziel/blueprints/{CURRENT BRANCH}
5151
urls_valid = True
52-
current_branch = os.popen('git rev-parse --abbrev-ref HEAD').read().strip()
52+
current_branch = os.environ.get('GITHUB_BRANCH') or os.popen('git rev-parse --abbrev-ref HEAD').read().strip()
5353
for url in urls:
5454
if not url.startswith('https://') and not url.startswith('http://'):
5555
continue

0 commit comments

Comments
 (0)