Skip to content

Commit

Permalink
DO NOT UPSTREAM: get github to build us some binaries
Browse files Browse the repository at this point in the history
  • Loading branch information
nshalman committed Feb 29, 2024
1 parent 162ee91 commit fbee834
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/ipxe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on:
push:
branches:
- main
- equinix-*

jobs:
build-ipxe:
Expand All @@ -16,5 +17,5 @@ jobs:
nix_path: nixpkgs=channel:nixos-unstable
- name: Build iPXE
env:
GITHUB_TOKEN: ${{ secrets.Token }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: (cd binary/; MAKEFLAGS=-j$(nproc) ./script/build_and_pr.sh)
7 changes: 4 additions & 3 deletions binary/script/build_and_pr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ binaries=(

git_email="github-actions[bot]@users.noreply.github.com"
git_name="github-actions[bot]"
repo="tinkerbell/ipxedust"
repo="nshalman/ipxedust" #XXX DO NOT UPSTREAM

# check for the GITHUB_TOKEN environment variable
function check_github_token() {
Expand Down Expand Up @@ -137,7 +137,7 @@ function commit_changes() {
# push changes to origin
function push_changes() {
local branch="${1}"
local repository="${2:-tinkerbell/ipxedust}"
local repository="${2:-nshalman/ipxedust}" #XXX
local git_actor="${3:-github-actions[bot]}"
local token="${4:-${GITHUB_TOKEN}}"

Expand Down Expand Up @@ -183,6 +183,7 @@ function main() {

check_github_token
changes_detected "${sha_file}"
head_branch="$(git rev-parse --abbrev-ref HEAD)"
branch="update_iPXE_$(date +"%Y_%m_%d_%H_%M_%S")"
create_branch "${branch}"
clean_iPXE
Expand All @@ -192,7 +193,7 @@ function main() {
# shellcheck disable=SC2068,SC2145
commit_changes "$(printf "%s " "${binaries[@]}"|xargs)" "Updated iPXE binaries"
push_changes "${branch}" "${repo}" "${git_name}" "${GITHUB_TOKEN}"
create_pull_request "${branch}" "main" "Update iPXE binaries" "Automated iPXE binaries update."
create_pull_request "${branch}" "${head_branch}" "Update iPXE binaries" "Automated iPXE binaries update."
clean_up
}

Expand Down

0 comments on commit fbee834

Please sign in to comment.