mirror of
https://github.com/Smaug123/WoofWare.Myriad
synced 2025-10-05 20:18:43 +00:00
Fix default branch name bit of update workflow (#189)
This commit is contained in:
8
.github/workflows/commit.py
vendored
8
.github/workflows/commit.py
vendored
@@ -21,9 +21,9 @@ if not GITHUB_TOKEN:
|
||||
REPO = os.environ.get("GITHUB_REPOSITORY")
|
||||
if not REPO:
|
||||
raise Exception("Supply GITHUB_REPOSITORY env var")
|
||||
GITHUB_BASE_REF = os.environ.get("GITHUB_BASE_REF") or ""
|
||||
if not GITHUB_BASE_REF:
|
||||
raise Exception("Supply GITHUB_BASE_REF env var")
|
||||
DEFAULT_BRANCH = os.environ.get("DEFAULT_BRANCH") or ""
|
||||
if not DEFAULT_BRANCH:
|
||||
raise Exception("Supply DEFAULT_BRANCH env var")
|
||||
GITHUB_OUTPUT = os.environ.get("GITHUB_OUTPUT") or ""
|
||||
if not GITHUB_OUTPUT:
|
||||
raise Exception("Supply GITHUB_OUTPUT env var")
|
||||
@@ -155,7 +155,7 @@ def main():
|
||||
create_branch(branch_name, new_commit_sha)
|
||||
print(f"Branch created: {branch_name}")
|
||||
|
||||
url, pr_num = create_pull_request(title="Upgrade Nix flake and deps", branch_name=branch_name, base_branch=GITHUB_BASE_REF)
|
||||
url, pr_num = create_pull_request(title="Upgrade Nix flake and deps", branch_name=branch_name, base_branch=DEFAULT_BRANCH)
|
||||
print(f"See PR at: {url}")
|
||||
|
||||
with open(GITHUB_OUTPUT, "a") as output_file:
|
||||
|
1
.github/workflows/flake_update.yaml
vendored
1
.github/workflows/flake_update.yaml
vendored
@@ -46,6 +46,7 @@ jobs:
|
||||
|
||||
- name: Create pull request
|
||||
env:
|
||||
DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
|
||||
BEARER_TOKEN: ${{ steps.generate-token.outputs.token }}
|
||||
run: /tmp/venv/bin/python .github/workflows/commit.py
|
||||
|
||||
|
Reference in New Issue
Block a user