Skip to content

Add private keys to go-build auto pin update workflow #9715

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion .semaphore/update-go-build-pins.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,12 @@ execution_time_limit:
minutes: 30

global_job_config:
secrets:
- name: private-repo
prologue:
commands:
- chmod 0600 ~/.keys/*
- ssh-add ~/.keys/*
- checkout

blocks:
Expand All @@ -20,6 +24,13 @@ blocks:
- name: marvin-github-token
jobs:
- name: Auto calico/go-build update
env_vars:
- name: GITHUB_TOKEN
value: ${MARVIN_GITHUB_TOKEN}
- name: GIT_COMMIT_EXTRA_FILES
value: metadata.mk
- name: GIT_COMMIT_TITLE
value: "Semaphore Auto go-build Update"
commands:
- CONFIRM=true make git-config
- CONFIRM=true GITHUB_TOKEN=${MARVIN_GITHUB_TOKEN} make trigger-auto-pin-update-process
- CONFIRM=true make trigger-auto-pin-update-process
3 changes: 2 additions & 1 deletion lib.Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,7 @@ commit-and-push-pr:
# Helper macros and targets to help with communicating with the github API
###############################################################################
GIT_COMMIT_MESSAGE?="Automatic Pin Updates"
GIT_COMMIT_TITLE?="Semaphore Auto Pin Update"
GIT_PR_BRANCH_BASE?=$(SEMAPHORE_GIT_BRANCH)
PIN_UPDATE_BRANCH?=semaphore-auto-pin-updates-$(GIT_PR_BRANCH_BASE)
GIT_PR_BRANCH_HEAD?=$(PIN_UPDATE_BRANCH)
Expand Down Expand Up @@ -563,7 +564,7 @@ endif
git checkout -b $(GIT_PR_BRANCH_HEAD)

create-pin-update-pr:
$(call github_pr_create,$(GIT_REPO_SLUG),[$(GIT_PR_BRANCH_BASE)] Semaphore Auto Pin Update,$(GIT_PR_BRANCH_HEAD),$(GIT_PR_BRANCH_BASE))
$(call github_pr_create,$(GIT_REPO_SLUG),[$(GIT_PR_BRANCH_BASE)] $(GIT_COMMIT_TITLE),$(GIT_PR_BRANCH_HEAD),$(GIT_PR_BRANCH_BASE))
echo 'Created pin update pull request $(PR_NUMBER)'

# Add the "/merge-when-ready" comment to enable the "merge when ready" functionality, i.e. when the pull request is passing
Expand Down
Loading