-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2281 from demergent-labs/workflow_updates
Workflow updates
- Loading branch information
Showing
8 changed files
with
163 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: Create Branch Prefix | ||
on: | ||
workflow_call: | ||
inputs: | ||
prefix: | ||
required: true | ||
type: string | ||
description: 'Prefix to use for branch names (e.g. benchmark, release)' | ||
version: | ||
required: true | ||
type: string | ||
description: 'Version to use in branch names' | ||
outputs: | ||
branch-prefix: | ||
description: 'The generated branch prefix ({prefix}--{version}-)' | ||
value: ${{ jobs.create-branch-prefix.outputs.branch-prefix }} | ||
base-branch: | ||
description: 'The generated base branch name ({prefix}--{version})' | ||
value: ${{ jobs.create-branch-prefix.outputs.base-branch }} | ||
secrets: | ||
GPG_SIGNING_KEY: | ||
required: true | ||
|
||
jobs: | ||
create-branch-prefix: | ||
name: Create Branch and Branch Prefix | ||
runs-on: ubuntu-latest | ||
outputs: | ||
branch-prefix: ${{ steps.create-prefix.outputs.branch-prefix }} | ||
base-branch: ${{ steps.create-prefix.outputs.base-branch }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.ref }} | ||
|
||
- id: create-prefix | ||
shell: bash | ||
run: | | ||
VERSION="${{ inputs.version }}" | ||
echo "branch-prefix=${{ inputs.prefix }}--$VERSION-" >> $GITHUB_OUTPUT | ||
echo "base-branch=${{ inputs.prefix }}--$VERSION" >> $GITHUB_OUTPUT | ||
- uses: ./.github/actions/configure_git | ||
with: | ||
gpg_signing_key: ${{ secrets.GPG_SIGNING_KEY }} | ||
|
||
- name: Create base branch | ||
run: | | ||
git checkout -b ${{ steps.create-prefix.outputs.base-branch }} | ||
git push origin ${{ steps.create-prefix.outputs.base-branch }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.