-
Notifications
You must be signed in to change notification settings - Fork 180
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 #4264 from onflow/tarak/blst-merge-master
[Crypto] merge master to BLST feature branch
- Loading branch information
Showing
1,065 changed files
with
42,416 additions
and
19,855 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
# This workflow is used to build and push one-off images for specific node types. This is useful | ||
# when deploying hotfixes or any time a change is not needed for all node roles. | ||
name: Build Node Docker Images | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
tag: | ||
type: string | ||
description: 'Git tag/commit' | ||
required: true | ||
docker_tag: | ||
type: string | ||
description: 'Docker tag' | ||
required: true | ||
# GHA doesn't support multi-selects, so simulating it with one boolean for each option | ||
build_access: | ||
type: boolean | ||
description: 'Access' | ||
required: false | ||
build_collection: | ||
type: boolean | ||
description: 'Collection' | ||
required: false | ||
build_consensus: | ||
type: boolean | ||
description: 'Consensus' | ||
required: false | ||
build_execution: | ||
type: boolean | ||
description: 'Execution' | ||
required: false | ||
build_verification: | ||
type: boolean | ||
description: 'Verification' | ||
required: false | ||
build_observer: | ||
type: boolean | ||
description: 'Observer' | ||
required: false | ||
include_without_netgo: | ||
type: boolean | ||
description: 'Build `without_netgo` images' | ||
required: false | ||
|
||
jobs: | ||
# matrix_builder generates a matrix that includes the roles selected in the input | ||
matrix_builder: | ||
name: Setup build jobs | ||
runs-on: ubuntu-latest | ||
outputs: | ||
matrix: ${{ steps.generate.outputs.matrix }} | ||
steps: | ||
- id: generate | ||
run: | | ||
roles=() | ||
if [[ "${{ inputs.build_access }}" = "true" ]]; then | ||
roles+=( "access" ) | ||
fi | ||
if [[ "${{ inputs.build_collection }}" = "true" ]]; then | ||
roles+=( "collection" ) | ||
fi | ||
if [[ "${{ inputs.build_consensus }}" = "true" ]]; then | ||
roles+=( "consensus" ) | ||
fi | ||
if [[ "${{ inputs.build_execution }}" = "true" ]]; then | ||
roles+=( "execution" ) | ||
fi | ||
if [[ "${{ inputs.build_verification }}" = "true" ]]; then | ||
roles+=( "verification" ) | ||
fi | ||
if [[ "${{ inputs.build_observer }}" = "true" ]]; then | ||
roles+=( "observer" ) | ||
fi | ||
rolesJSON=$(jq --compact-output --null-input '$ARGS.positional' --args -- "${roles[@]}") | ||
echo "matrix={\"role\":$(echo $rolesJSON)}" >> $GITHUB_OUTPUT | ||
docker-push: | ||
name: ${{ matrix.role }} images | ||
runs-on: ubuntu-latest | ||
needs: matrix_builder | ||
|
||
# setup jobs for each role | ||
strategy: | ||
fail-fast: false | ||
matrix: ${{ fromJson(needs.matrix_builder.outputs.matrix) }} | ||
|
||
steps: | ||
- name: Setup Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: '1.19' | ||
- name: Checkout repo | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ inputs.tag }} | ||
# Provide Google Service Account credentials to Github Action, allowing interaction with the Google Container Registry | ||
# Logging in as github-actions@dl-flow.iam.gserviceaccount.com | ||
- name: Docker login | ||
uses: docker/login-action@v1 | ||
with: | ||
registry: gcr.io | ||
username: _json_key | ||
password: ${{ secrets.GCR_SERVICE_KEY }} | ||
|
||
- name: Build/Push ${{ matrix.role }} images | ||
env: | ||
IMAGE_TAG: ${{ inputs.docker_tag }} | ||
GITHUB_CREDS: "machine github.com login ${{ secrets.REPO_SYNC_USER }} password ${{ secrets.REPO_SYNC }}" | ||
run: | | ||
make docker-build-${{ matrix.role }} docker-push-${{ matrix.role }} | ||
- name: Build/Push ${{ matrix.role }} without_netgo images | ||
if: ${{ inputs.include_without_netgo }} | ||
env: | ||
IMAGE_TAG: ${{ inputs.docker_tag }} | ||
GITHUB_CREDS: "machine github.com login ${{ secrets.REPO_SYNC_USER }} password ${{ secrets.REPO_SYNC }}" | ||
run: | | ||
make docker-build-${{ matrix.role }}-without-netgo docker-push-${{ matrix.role }}-without-netgo |
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
Validating CODEOWNERS rules …
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.