-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Light bridge pipeline
- Loading branch information
Showing
4 changed files
with
68 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: Build & Release Light Bridge | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
force: | ||
type: boolean | ||
default: false | ||
required: false | ||
description: Always execute, even if no changes have been made | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
build_docker: | ||
name: Build Docker Image | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: dorny/paths-filter@v2 | ||
id: changes | ||
with: | ||
filters: | | ||
src: | ||
- 'packages/boba/teleportation/**' | ||
# run only if some file in 'src' folder was changed | ||
- if: inputs.force || steps.changes.outputs.src == 'true' | ||
name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
- if: inputs.force || steps.changes.outputs.src == 'true' | ||
name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
- if: inputs.force || steps.changes.outputs.src == 'true' | ||
name: Login to Docker Hub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_ACCESS_TOKEN_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN_SECRET }} | ||
- if: inputs.force || steps.changes.outputs.src == 'true' | ||
name: Get project versions | ||
run: | | ||
echo "version=$(cat ./packages/boba/teleportation/package.json | jq ".version" | tr -d '"\r\n')" >> $GITHUB_OUTPUT | ||
id: version | ||
|
||
- if: inputs.force || steps.changes.outputs.src == 'true' | ||
name: Build version specific docker image | ||
run: cd ops && docker-compose -f docker-compose.yml -f docker-compose-side.yml build teleportation | ||
- if: inputs.force || steps.changes.outputs.src == 'true' | ||
name: Tag image | ||
run: docker tag teleportation bobanetwork/lightbridge:v${{ steps.version.outputs.version }} | ||
- if: inputs.force || steps.changes.outputs.src == 'true' | ||
name: Push version specific docker image | ||
run: docker push bobanetwork/lightbridge:v${{ steps.version.outputs.version }} | ||
- if: inputs.force || steps.changes.outputs.src == 'true' | ||
name: Tag image | ||
run: docker tag teleportation bobanetwork/lightbridge:stable | ||
- if: inputs.force || steps.changes.outputs.src == 'true' | ||
name: Push stable docker image | ||
run: docker push bobanetwork/lightbridge:stable |
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