Skip to content

Commit

Permalink
build(release): create PRs on homebrew-tap (#2385)
Browse files Browse the repository at this point in the history
## Description

Change from creating 2 commits directly on
`defenseunicorns/homebrew-tap` to creating a PR.

## Type of change

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [x] Other (security config, docs update, etc)

## Checklist before merging

- [ ] Test, docs, adr added or updated as needed
- [x] [Contributor Guide
Steps](https://github.com/defenseunicorns/zarf/blob/main/CONTRIBUTING.md#developer-workflow)
followed

---------

Signed-off-by: razzle <harry@razzle.cloud>
  • Loading branch information
Noxsios committed Mar 21, 2024
1 parent 95c42ff commit 0538841
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 7 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/release.yml
Expand Up @@ -175,11 +175,12 @@ jobs:
- name: Get Brew tap repo token
id: brew-tap-token
uses: peter-murray/workflow-application-token-action@dc0413987a085fa17d19df9e47d4677cf81ffef3 # v3.0.0
uses: actions/create-github-app-token@f2acddfb5195534d487896a656232b016a682f3c # v1.9.0
with:
application_id: ${{ secrets.HOMEBREW_TAP_WORKFLOW_GITHUB_APP_ID }}
application_private_key: ${{ secrets.HOMEBREW_TAP_WORKFLOW_GITHUB_APP_SECRET }}
organization: defenseunicorns
app-id: ${{ secrets.HOMEBREW_TAP_WORKFLOW_GITHUB_APP_ID }}
private-key: ${{ secrets.HOMEBREW_TAP_WORKFLOW_GITHUB_APP_SECRET }}
owner: defenseunicorns
repositories: homebrew-tap

# Create the GitHub release notes, upload artifact backups to S3, publish homebrew recipe
- name: Run GoReleaser
Expand Down
18 changes: 15 additions & 3 deletions .goreleaser.yaml
Expand Up @@ -54,7 +54,7 @@ sboms:
snapshot:
name_template: "{{ incpatch .Version }}-snapshot"

# Use the auto-generated changlog github provides
# Use the auto-generated changelog github provides
changelog:
use: github-native

Expand All @@ -76,10 +76,15 @@ brews:
owner: defenseunicorns
name: homebrew-tap
token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
branch: "{{ .ProjectName }}-{{ .Tag }}"
pull_request:
enabled: true
base:
branch: main
owner: defenseunicorns
name: homebrew-tap

commit_msg_template: "Brew formula update for {{ .ProjectName }} version {{ .Tag }}"
commit_msg_template: "build(release): upgrade {{ .ProjectName }} to {{ .Tag }}"
homepage: "https://zarf.dev/"
description: "DevSecOps for Air Gap"

Expand All @@ -90,7 +95,14 @@ brews:
owner: defenseunicorns
name: homebrew-tap
token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
commit_msg_template: "Brew formula update for {{ .ProjectName }} versioned release {{ .Tag }}"
branch: "{{ .ProjectName }}-{{ .Tag }}"
pull_request:
enabled: true
base:
branch: main
owner: defenseunicorns
name: homebrew-tap
commit_msg_template: "build(release): {{ .ProjectName }}@{{ .Tag }}"
homepage: "https://zarf.dev/"
description: "DevSecOps for Air Gap"

Expand Down

0 comments on commit 0538841

Please sign in to comment.