Skip to content
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

feat: add core binary upload to cloudflare r2 bucket #2126

Merged
merged 17 commits into from
Mar 26, 2024
Merged
Changes from 10 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
46 changes: 46 additions & 0 deletions .github/workflows/build-binaries-and-push-to-r2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Upload core binary to Cloudflare R2 bucket

on:
push:
branches:
- '*'
maancham marked this conversation as resolved.
Show resolved Hide resolved
maancham marked this conversation as resolved.
Show resolved Hide resolved

jobs:
build-and-upload:
name: Build binary from current commit and push to R2
runs-on: ubuntu-22.04
maancham marked this conversation as resolved.
Show resolved Hide resolved
permissions:
contents: write
packages: write
id-token: write
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: "0"
path: axelar-core
submodules: recursive

- name: Build axelard binary with commit hash
id: build-binary
run: |
mkdir ./binary_file/
cd axelar-core
make build
maancham marked this conversation as resolved.
Show resolved Hide resolved
commit_hash=$(git rev-parse --short HEAD)
echo "The commit hash: $commit_hash"
cd ..
sudo mv axelar-core/bin/axelard ./binary_file/axelard_$commit_hash
echo "binary-directory=./binary_file" >> $GITHUB_OUTPUT
maancham marked this conversation as resolved.
Show resolved Hide resolved

- name: List contents of root directory
run: ls -la

- uses: ryand56/r2-upload-action@latest
with:
r2-account-id: ${{ secrets.R2_ACCOUNT_ID }}
r2-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID_CF }}
r2-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY_CF }}
r2-bucket: ${{ secrets.R2_BUCKET }}
source-dir: ${{ steps.build-binary.outputs.binary-directory }}
destination-dir: ./pre-releases/axelard/
cgorenflo marked this conversation as resolved.
Show resolved Hide resolved
Loading