feat(frontend-old): add jupiter widget #44
Workflow file for this run
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
name: ci | |
'on': | |
pull_request: | |
types: [closed] | |
branches: | |
- main | |
push: | |
tags: | |
- 'v*' | |
jobs: | |
deploy-patch-production: | |
runs-on: ubuntu-latest | |
permissions: | |
actions: 'read' | |
contents: 'read' | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: set nx affected shas | |
uses: nrwl/nx-set-shas@v3 | |
- name: setup node | |
uses: actions/setup-node@v3 | |
with: | |
cache: yarn | |
node-version-file: '.nvmrc' | |
- run: yarn --immutable | |
- name: Check if patch-bot is affected | |
id: check | |
run: | | |
patch_is_affected="$(yarn nx print-affected --type=app --select=projects --base=HEAD~1 | grep -q 'patch-bot' && echo 'true' || echo 'false')" | |
echo "affected=$patch_is_affected" >> "$GITHUB_OUTPUT" | |
- name: Build patch-bot | |
if: 'steps.check.outputs.affected' | |
run: yarn nx build patch-bot --prod | |
- name: Login to Docker Hub | |
if: 'steps.check.outputs.affected' | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKER_HUB_USERNAME }} | |
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | |
- name: Set up QEMU | |
if: 'steps.check.outputs.affected' | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx | |
if: 'steps.check.outputs.affected' | |
id: buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Build and push | |
if: 'steps.check.outputs.affected' | |
id: docker_build | |
uses: docker/build-push-action@v3 | |
with: | |
build-args: | | |
discord_bot_token=${{secrets.DISCORD_BOT_TOKEN}} | |
features_endpoint=${{secrets.FEATURES_ENDPOINT}} | |
main_private_key=${{secrets.MAIN_PRIVATE_KEY}} | |
mongo_db_uri=${{secrets.MONGO_DB_URI}} | |
rpc_api_base_url=${{secrets.RPC_API_BASE_URL}} | |
sentry_url=${{secrets.SENTRY_URL}} | |
solscan_api_token=${{secrets.SOLSCAN_API_TOKEN}} | |
file: ./apps/patch-bot/Dockerfile | |
context: . | |
push: true | |
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/sai-bot:${{ github.sha }},${{ secrets.DOCKER_HUB_USERNAME }}/sai-bot:latest | |
platforms: linux/arm64 | |
- name: Image digest | |
if: 'steps.check.outputs.affected' | |
run: echo ${{ steps.docker_build.outputs.digest }} |