Skip to content

Commit

Permalink
feat: add branch input, edit checkout step
Browse files Browse the repository at this point in the history
  • Loading branch information
maancham committed Mar 25, 2024
1 parent 135456f commit 51083fa
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion .github/workflows/build-binaries-and-push-to-r2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,39 @@ on:
branches:
- main
workflow_dispatch:
inputs:
branch:
description: Github branch to checkout for build
required: true
default: main
type: string

jobs:
build-and-upload:
name: Build binary from current commit and push to R2
name: Build binary and push to R2
runs-on: ubuntu-22.04
permissions:
contents: write
packages: write
id-token: write
steps:
- name: Determine branch
id: get-branch-name
run: |
if [ "${{ github.event_name }}" == "push" ]; then
branch="main"
else
branch="${{ inputs.branch }}"
fi
echo "branch=branch" >> $GITHUB_OUTPUT
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: "0"
path: axelar-core
submodules: recursive
ref: ${{ steps.get-branch-name.outputs.branch }}

- name: Build axelard binary with version and commit hash
id: build-binary
Expand Down

0 comments on commit 51083fa

Please sign in to comment.