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

[CI] Add github action to build boot-tools on demand #3787

Merged
merged 3 commits into from
Jan 11, 2023
Merged
Changes from 2 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
60 changes: 60 additions & 0 deletions .github/workflows/tools.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Build Tools

on:
workflow_dispatch:
inputs:
tag:
description: 'Tagged commit to build tools against'
required: true
type: string
promote:
description: 'Should this build be promoted to the official boot-tools?'
required: false
type: boolean

jobs:
build-publish:
name: Build boot tools
runs-on: ubuntu-latest
steps:
- id: auth
uses: google-github-actions/auth@v1
with:
credentials_json: ${{ secrets.GCR_SERVICE_KEY }} # TODO: we need a new key to allow uploads
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sjonpaulbrown @gomisha could one of your help create and add a new secret for this usecase?

- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: '1.19'
- name: Set up Google Cloud SDK
uses: google-github-actions/setup-gcloud@v1
with:
project_id: flow
- name: Checkout repo
uses: actions/checkout@v2
with:
ref: ${{ inputs.tag }}
- name: Build relic
run: make crypto_setup_gopath
- name: Build Tools
run: |
make tool-bootstrap
make tool-util
make tool-transit
- name: Upload boot-tools
run: |
mkdir boot-tools
mv bootstrap transit boot-tools/
tar -czf boot-tools.tar ./boot-tools/
gsutil cp boot-tools.tar gs://flow-genesis-bootstrap/tools/${{ inputs.tag }}/boot-tools.tar
- name: Upload util
run: |
tar -czf util.tar ./util
gsutil cp boot-tools.tar gs://flow-genesis-bootstrap/tools/${{ inputs.tag }}/util.tar
- name: Promote boot-tools
run: |
if [[ "${{ inputs.promote }}" = true ]]; then
echo "promoting boot-tools.tar"
gsutil cp boot-tools.tar gs://flow-genesis-bootstrap/boot-tools.tar
else
echo "not promoting boot-tools.tar"
fi