add github action
This commit is contained in:
parent
25497e97ad
commit
437359deff
5
.github/FUNDING.yml
vendored
Normal file
5
.github/FUNDING.yml
vendored
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
# These are supported funding model platforms
|
||||||
|
|
||||||
|
# github: liangping
|
||||||
|
issuehunt: ping-pub # Replace with a single IssueHunt username
|
||||||
|
|
21
.github/workflows/config-check.yaml
vendored
Normal file
21
.github/workflows/config-check.yaml
vendored
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
|
||||||
|
name: Config Checker
|
||||||
|
|
||||||
|
on:
|
||||||
|
# push:
|
||||||
|
# branches: [ master ]
|
||||||
|
pull_request:
|
||||||
|
# branches: [ master ]
|
||||||
|
paths:
|
||||||
|
- 'chains/mainnet/**'
|
||||||
|
- 'chains/testnet/**'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
deploy:
|
||||||
|
name: Check Blockchain Config
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Git Checkout Latest
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
- name: Check Chain Configs
|
||||||
|
uses: ping-pub/ping-dashboard-config-checker@v1.0
|
51
.github/workflows/docker.yaml
vendored
Normal file
51
.github/workflows/docker.yaml
vendored
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
name: docker
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- 'master-backup'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
docker:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
# -
|
||||||
|
# name: Set up QEMU
|
||||||
|
# uses: docker/setup-qemu-action@v1
|
||||||
|
# -
|
||||||
|
# name: Set up Docker Buildx
|
||||||
|
# uses: docker/setup-buildx-action@v1
|
||||||
|
- name: Install
|
||||||
|
run: yarn install
|
||||||
|
- name: Build
|
||||||
|
run: yarn run vue-cli-service build
|
||||||
|
- name: Login to DockerHub
|
||||||
|
uses: docker/login-action@v1
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
- name: Docker meta
|
||||||
|
id: meta
|
||||||
|
uses: docker/metadata-action@v3
|
||||||
|
with:
|
||||||
|
# list of Docker images to use as base name for tags
|
||||||
|
images: |
|
||||||
|
yaoling/wallet
|
||||||
|
# generate Docker tags based on the following events/attributes
|
||||||
|
tags: |
|
||||||
|
type=sha
|
||||||
|
type=schedule
|
||||||
|
type=ref,event=branch
|
||||||
|
type=ref,event=pr
|
||||||
|
type=semver,pattern={{version}}
|
||||||
|
type=semver,pattern={{major}}.{{minor}}
|
||||||
|
type=semver,pattern={{major}}
|
||||||
|
- name: Build and push
|
||||||
|
uses: docker/build-push-action@v2
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
push: ${{ github.event_name != 'pull_request' }}
|
||||||
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
|
labels: ${{ steps.meta.outputs.labels }}
|
28
.github/workflows/mainnet-deploy.yaml
vendored
Normal file
28
.github/workflows/mainnet-deploy.yaml
vendored
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
|
||||||
|
name: Deploy to ping.pub
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ master ]
|
||||||
|
# pull_request:
|
||||||
|
# branches: [ master ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
deploy:
|
||||||
|
name: Ping deploy
|
||||||
|
runs-on: mainnet
|
||||||
|
steps:
|
||||||
|
- name: Environment
|
||||||
|
run: export NODE_OPTIONS="--max_old_space_size=4096"
|
||||||
|
|
||||||
|
- name: Git Checkout Latest
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Install
|
||||||
|
run: yarn install --ignore-engines
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: yarn run vue-cli-service build
|
||||||
|
|
||||||
|
- name: Deploy
|
||||||
|
run: cp -rf ./dist/* /var/www/html/
|
27
.github/workflows/testnet-deploy.yaml
vendored
Normal file
27
.github/workflows/testnet-deploy.yaml
vendored
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
|
||||||
|
name: Testnet Deploy
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ testnet ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ testnet ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
deploy:
|
||||||
|
name: Ping deploy
|
||||||
|
runs-on: testnet
|
||||||
|
steps:
|
||||||
|
- name: print
|
||||||
|
run: echo ${GITHUB_REF#refs/heads/}
|
||||||
|
- name: Git Checkout Latest
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Install
|
||||||
|
run: yarn install
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: yarn run vue-cli-service build
|
||||||
|
|
||||||
|
- name: Deploy
|
||||||
|
run: cp -rf ./dist/* /var/www/html/
|
@ -22,5 +22,14 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<script type="module" src="/src/main.ts"></script>
|
<script type="module" src="/src/main.ts"></script>
|
||||||
|
<!-- Google tag (gtag.js) -->
|
||||||
|
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-238887-1"></script>
|
||||||
|
<script>
|
||||||
|
window.dataLayer = window.dataLayer || [];
|
||||||
|
function gtag(){dataLayer.push(arguments);}
|
||||||
|
gtag('js', new Date());
|
||||||
|
|
||||||
|
gtag('config', 'UA-238887-1');
|
||||||
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
Loading…
Reference in New Issue
Block a user