Use emoji images for meme coin info #165
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: Build and deploy EPIC | |
on: | |
push: | |
branches: | |
- main | |
- dev/** | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
matrix_config: | |
runs-on: ubuntu-latest | |
outputs: | |
matrix: ${{ steps.set-matrix.outputs.matrix }} | |
steps: | |
- id: set-matrix | |
run: | | |
echo "::set-output name=matrix::$(echo '{"deployment_name": ["development", "production"], "isProduction": [${{ contains(github.ref, 'refs/heads/main') }}], "isDevelopment": [${{ startsWith(github.ref, 'refs/heads/dev/') }}], "exclude": [{"isProduction": true, "deployment_name": "development"}, {"isDevelopment": true, "deployment_name": "production"}]}' | jq -c)" | |
front_build: | |
needs: matrix_config | |
strategy: | |
matrix: ${{ fromJSON(needs.matrix_config.outputs.matrix) }} | |
name: Build & push ${{ matrix.deployment_name }} Docker image to DockerHub | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Prepare ${{ matrix.deployment_name }} build | |
uses: './.github/actions/common-ci-setup' | |
with: | |
username_input: ${{ secrets.DOCKER_USERNAME }} | |
password_input: ${{ secrets.DOCKER_PASSWORD }} | |
deployment_name: ${{ matrix.deployment_name }} | |
# TODO: move to common-ci-setup | |
- name: Build production image | |
if: matrix.deployment_name == 'production' | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
builder: ${{ steps.buildx.outputs.name }} | |
file: docker/Dockerfile | |
push: true | |
build-args: | | |
GH_NEXT_PUBLIC_IS_MAINTENANCE=false | |
GH_NEXTAUTH_URL=https://epicapp.net | |
GH_NEXT_PUBLIC_BASE_URL=https://epicapp.net | |
GH_NEXT_PUBLIC_DATAHUB_QUERY_URL=https://epic-data-hub.subsocial.network/graphql | |
GH_NEXT_PUBLIC_DATAHUB_SUBSCRIPTION_URL=wss://epic-data-hub.subsocial.network/graphql-ws | |
GH_DATAHUB_QUEUE_URL=https://epic-queue-data-hub.subsocial.network/graphql | |
GH_NOTIFICATIONS_URL=https://epic-notif-data-hub.subsocial.network/graphql | |
GH_NEXT_PUBLIC_APP_ID=0xd25962422081e4086fbce5ae5b6232c6 | |
GH_NEXT_PUBLIC_NOTIFICATION_APP_ID=BECyoVsDLEgsOj9MvhoetL3YGYZVCE5RzhADmBugpp0hu7QBV_xG8veiT_qAFxF9S8qXKhPvaPiD5oMrdWrFNB0 | |
GH_NEXT_PUBLIC_TELEGRAM_NOTIFICATION_BOT=https://t.me/grill_notifications_bot/ | |
GH_NEXT_PUBLIC_OFFCHAIN_POSTING_HUBS=12662 | |
GH_NEXT_PUBLIC_SPACE_IDS=0xd25962422081e4086fbce5ae5b6232c6 | |
GH_NEXT_PUBLIC_MAIN_CHAT_ID=0x22379846e332920ee808735a978c7008 | |
GH_NEXT_PUBLIC_CONTEST_CHAT_ID=0x0106b70599fea6682ec0de3c6ab248d4 | |
GH_NEXT_PUBLIC_CONTEST_NAME=MEMECOIN CONTEST | |
GH_NEXT_PUBLIC_CONTEST_END_TIME=1720796400739 | |
GH_NEXT_PUBLIC_TIME_CONSTRAINT=300000 | |
GH_NEXT_PUBLIC_CONTEST_RANGE_KEY=ReferrersRankedListByReferralsCountCp_20240722_20240728 | |
GH_NEXT_PUBLIC_AMP_ID=40d4174295c7edf657fc3bedf2748549 | |
GH_NEXT_PUBLIC_COMMUNITY_HUB_ID=12455 | |
GH_NEXT_PUBLIC_GA_ID=G-TP1XEFNHQD | |
GH_NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=grill-web-push.firebaseapp.com | |
GH_NEXT_PUBLIC_FIREBASE_PROJECT_ID=grill-web-push | |
GH_NEXT_PUBLIC_FIREBASE_API_KEY=AIzaSyCdu_lvl18590HFoAXTysuKStaJJkaA4h4 | |
GH_NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=grill-web-push.appspot.com | |
GH_NEXT_PUBLIC_FIREBASE_MESSAGING_ID=762898090466 | |
GH_NEXT_PUBLIC_FIREBASE_APP_ID=1:762898090466:web:8b27ce87e8cb476f95d1bb | |
GH_NEXT_PUBLIC_PROPOSALS_HUB=27942 | |
GH_SERVER_MNEMONIC=${{ secrets.GH_SERVER_MNEMONIC }} | |
GH_NEXT_PUBLIC_NEYNAR_CLIENT_ID=e8dc01b0-046c-4698-98ac-05432050961d | |
GH_FRAMES_SECRET=${{ secrets.GH_FRAMES_SECRET }} | |
GH_NEYNAR_API_KEY=${{ secrets.GH_NEYNAR_API_KEY }} | |
GH_NEXT_PUBLIC_TELEGRAM_BOT_ID=6523818125 | |
GH_NEXT_PUBLIC_TELEGRAM_BOT_USERNAME=EpicAppBot | |
GH_NEXT_PUBLIC_DAPP_PUBLIC_KEY=7iXtxm8bXK7XGSvnHzYZSojYHYoNiMa4m59ZovYwBzy5 | |
target: runner | |
tags: | | |
${{ env.image }} | |
dappforce/subsocial-web-app:epic-grillchat-master-latest | |
cache-from: type=local,src=/tmp/.buildx-cache | |
cache-to: type=local,dest=/tmp/.buildx-cache-new | |
- name: Build pre-release image | |
if: matrix.deployment_name == 'development' | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
builder: ${{ steps.buildx.outputs.name }} | |
file: docker/Dockerfile | |
push: true | |
build-args: | | |
GH_NEXT_PUBLIC_IS_MAINTENANCE=false | |
GH_NEXT_PUBLIC_AMP_ID=2ecd0305eaa641e48ef9a0fd6ab8a923 | |
GH_NEXT_PUBLIC_GA_ID=fake | |
GH_IPFS_WRITE_URL=https://gw-seattle.crustcloud.io | |
GH_IPFS_PIN_URL=https://test-pin.crustcloud.io/psa | |
GH_NEXT_PUBLIC_NOTIFICATION_APP_ID=BJaKjx7xtiIXtSUT8tR6VDG0WwhFwdqOqp8L5kc6alGBUtndnlV_DUJ6sze_z70VEBOKk4AT_wZTJqE9dC7sbEQ | |
GH_NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=gl-notifications-dev.firebaseapp.com | |
GH_NEXT_PUBLIC_FIREBASE_PROJECT_ID=gl-notifications-dev | |
GH_NEXT_PUBLIC_FIREBASE_API_KEY=AIzaSyC7pSekdJQ0PpUDCY4eEkEeDGCazVES6QI | |
GH_NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=gl-notifications-dev.appspot.com | |
GH_NEXT_PUBLIC_FIREBASE_MESSAGING_ID=581626459774 | |
GH_NEXT_PUBLIC_FIREBASE_APP_ID=1:581626459774:web:6b7098eb48c0b142f50a2f | |
GH_NEXT_PUBLIC_DATAHUB_QUERY_URL=https://dev-epic-fast-test-epic-dh-core.subsocial.network/graphql | |
GH_NEXT_PUBLIC_DATAHUB_SUBSCRIPTION_URL=wss://dev-epic-fast-test-epic-dh-core.subsocial.network/graphql-ws | |
GH_DATAHUB_QUEUE_URL=https://dev-epic-fast-test-epic-dh-queue.subsocial.network/graphql | |
GH_NOTIFICATIONS_URL=https://dev-epic-fast-test-epic-dh-notif.subsocial.network/graphql | |
GH_NEXT_PUBLIC_OFFCHAIN_POSTING_HUBS=12468 | |
GH_NEXT_PUBLIC_PROPOSALS_HUB=12364 | |
GH_NEXT_PUBLIC_APP_ID=0xa580866e85dc3f78346ab3131210064e | |
GH_NEXT_PUBLIC_SPACE_IDS=0xa580866e85dc3f78346ab3131210064e | |
GH_NEXT_PUBLIC_MAIN_CHAT_ID=0x6c975987eac223e03deae00f2f7fa8e8 | |
GH_NEXT_PUBLIC_CONTEST_CHAT_ID=0x850f0f5c0c244eba16425a464b0becfc | |
GH_NEXT_PUBLIC_CONTEST_NAME=MEMECOIN CONTEST | |
GH_NEXT_PUBLIC_CONTEST_END_TIME=1720796400739 | |
GH_NEXT_PUBLIC_TIME_CONSTRAINT=5000 | |
GH_NEXT_PUBLIC_CONTEST_RANGE_KEY=ReferrersRankedListByReferralsCountCp_20240722_20240728 | |
GH_NEXT_PUBLIC_TELEGRAM_NOTIFICATION_BOT=https://t.me/g_notif_staging_bot/ | |
GH_TELEGRAM_BOT_TOKEN="7038999347:AAGBgXTWcXpR4vZPW9A8_ia9PkWOpeyDeWA" | |
GH_NEXT_PUBLIC_BASE_URL=https://dev-${{ env.BRANCH_NAME }}-epicapp.subsocial.network | |
# without base path | |
GH_NEXTAUTH_URL=https://dev-${{ env.BRANCH_NAME }}-epicapp.subsocial.network | |
# with base path | |
# GH_NEXTAUTH_URL=https://dev-${{ env.BRANCH_NAME }}-epicapp.subsocial.network/c/api/auth | |
# GH_NEXT_PUBLIC_BASE_PATH=/c | |
GH_NEXT_PUBLIC_TELEGRAM_BOT_ID=1960764016 | |
GH_NEXT_PUBLIC_TELEGRAM_BOT_USERNAME=subsocial_staging_bot | |
GH_NEXT_PUBLIC_NEYNAR_CLIENT_ID=e8dc01b0-046c-4698-98ac-05432050961d | |
GH_FRAMES_SECRET=JG/W96svVHQ3bdaEKWm1h8xJXqxDtqZ6t7tKCZNWhh0= | |
GH_NEXT_PUBLIC_DAPP_PUBLIC_KEY=GqJKFQavHPEvngh6hNwt9FbqcEYsNvduGvyQuT6ARTHk | |
target: runner | |
tags: | | |
${{ env.image }} | |
cache-from: type=local,src=/tmp/.buildx-cache | |
cache-to: type=local,dest=/tmp/.buildx-cache-new | |
- name: Move cache | |
run: | | |
rm -rf /tmp/.buildx-cache | |
mv /tmp/.buildx-cache-new /tmp/.buildx-cache | |
front_deploy: | |
strategy: | |
matrix: ${{ fromJSON(needs.matrix_config.outputs.matrix) }} | |
name: Deploy ${{ matrix.deployment_name }} | |
runs-on: ubuntu-latest | |
needs: [matrix_config, front_build] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Deploy EPIC to Production infrastructure | |
if: matrix.deployment_name == 'production' | |
uses: './.github/actions/common-cd-setup' | |
with: | |
do_access_token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN_PROD }} | |
k8s_cluster_id: ${{ secrets.K8S_PROD }} | |
deployment_name: ${{ matrix.deployment_name }} | |
cf_zone_id: ${{ secrets.CF_ZONE }} | |
cf_login_mail: ${{ secrets.CF_MAIL }} | |
cf_login_token: ${{ secrets.CF_TOKEN }} | |
- name: Deploy EPIC pre-release to Development infrastructure | |
if: matrix.deployment_name == 'development' | |
uses: './.github/actions/common-cd-setup' | |
with: | |
do_access_token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN_DEV }} | |
k8s_cluster_id: ${{ secrets.K8S_DEV_CLUSTER_ID }} | |
deployment_name: ${{ matrix.deployment_name }} | |
cf_zone_id: ${{ secrets.CF_ZONE }} | |
cf_login_mail: ${{ secrets.CF_MAIL }} | |
cf_login_token: ${{ secrets.CF_TOKEN }} |