Skip to content

fix curl

fix curl #34

Workflow file for this run

name: Deploy Atoma Proxy dashboard
on:
push:
branches:
- with-logic
workflow_dispatch: # Add this line to enable manual triggering
permissions:
packages: write
jobs:
commit-hash:
runs-on: ubuntu-latest
outputs:
commit_hash: ${{ steps.get_commit.outputs.commit_hash }}
steps:
- uses: actions/checkout@v4
- name: Get commit hash
id: get_commit
run: echo "::set-output name=commit_hash::$(git rev-parse HEAD)"
build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
- name: Install dependencies
run: npm ci --force
- name: Build
run: npm run build
# - name: Test
# run: npm test
build-and-push-image:
needs:
- build-and-test
- commit-hash
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set short git commit SHA
id: vars
run: |
calculatedSha=$(git rev-parse --short ${{ github.sha }})
echo "COMMIT_SHORT_SHA=$calculatedSha" >> $GITHUB_ENV
- name: Log in to the Container registry
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
registry: https://ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
with:
context: .
push: true
tags: |
ghcr.io/atoma-network/atoma-dashboard:${{ needs.commit-hash.outputs.commit_hash }}
ghcr.io/atoma-network/atoma-dashboard:latest
build-args: |
NEXT_PUBLIC_PROXY_URL=https://credentials.atomacloud.com
NEXT_PUBLIC_PROXY_WALLET=0xec2c53f7c706e37518afedb71bbe46021fb5b1ab1c2a56754541120cac8d7a9e
NEXT_PUBLIC_USDC_TYPE=0xa1ec7fc00a6f40db9693ad1415d0c193ad3906494428cf252621037bd7117e29::usdc::USDC
deploy:
runs-on: ubuntu-latest
needs:
- build-and-push-image
- commit-hash
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: create env file
run: |
echo "GIT_COMMIT_HASH=${{ github.sha }}" >> env
- name: 'Docker Stack Deploy'
uses: cssnr/stack-deploy-action@v1
with:
name: 'atoma-dashboard'
file: 'docker-stack.yaml'
host: atomacloud.com
user: root
ssh_key: ${{ secrets.DEPLOY_SSH_KEY }}
env_file: './env'