Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
33 changes: 33 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
name: 👾 Bug Report
about: Report a bug or issue with the project.
title: ''
labels: 'bug'
assignees: ''

---

### Description
A clear and concise description of what the bug is.

### Steps To Reproduce
1. Log in...
2. Ensure that...
3. Allow a long period of inactivity to pass...
4. Observe that...
5. Attempt to log in...

### Current Behavior
- After the period of inactivity...
- When the user tries to log in using another method...
- This causes a bug due to...

### Expected Behavior
- After a long period of inactivity...
- When a user logs in successfully...
- This ensures that only...

### Environment
- Platform: PC
- Node: v18.18.0
- Browser: Chrome 126.0.6478.56
10 changes: 10 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
blank_issues_enabled: false
issue_template:
- name: 👾 Bug Report
description: Report a bug or issue with the project.
labels: ["bug"]
template: bug_report.md
- name: 💡 Feature Request
description: Create a new ticket for a new feature request.
labels: ["enhancement"]
template: feature_request.md
27 changes: 27 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
name: 💡 Feature Request
about: Create a new ticket for a new feature request
title: ''
labels: 'enhancement'
assignees: ''

---

### Expected Behavior
Describe the expected behavior here.

### Specifications
As a `user`, I would like to `action` so that `reason`.

**Features:**
- describe feature details here.

**Development Tasks:**
- [ ] Task 1
- [ ] Task 2

### Dependencies
List any dependencies that are required for this feature by providing links to the issues or repositories.

### References
List any references that are related to this feature request.
97 changes: 97 additions & 0 deletions .github/workflows/deploy-tag.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
name: Build and Deploy Release

on:
push:
tags:
- "v*.*.*"
env:
DOTNET_INSTALL_DIR: "./.dotnet"

jobs:
publish:
runs-on: aelfscan-runner
strategy:
matrix:
servicename:
[
AElfScanServer.Worker,
AElfScanServer.HttpApi.Host,
AElfScanServer.Silo,
AElfScanServer.AuthServer,
AElfScanServer.DbMigrator
]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: "8.0"
- run: dotnet publish src/${{ matrix.servicename }}/${{ matrix.servicename }}.csproj -o out/${{ matrix.servicename }}
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.servicename }}
path: out/${{ matrix.servicename }}
retention-days: 1
build-and-push-image:
needs: publish
runs-on: aelfscan-runner
strategy:
matrix:
servicename:
[
AElfScanServer.Worker,
AElfScanServer.HttpApi.Host,
AElfScanServer.Silo,
AElfScanServer.AuthServer,
AElfScanServer.DbMigrator
]
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download a single artifact
uses: actions/download-artifact@v4
with:
name: ${{ matrix.servicename }}
path: out/${{ matrix.servicename }}
- name: Create image tag
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ secrets.REPOSITORY_REGION }}-docker.pkg.dev/${{ secrets.PROJECT_ID }}/${{ secrets.REPOSITORY }}/${{ matrix.servicename }}
tags: |
type=ref,event=tag
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
push: true
build-args: |
servicename=${{ matrix.servicename }}
platforms: linux/amd64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

dispatch:
runs-on: aelfscan-runner
needs: build-and-push-image
steps:
- name: Deploy
uses: actions/github-script@v6
with:
github-token: ${{ secrets.TOK }}
script: |
await github.rest.actions.createWorkflowDispatch({
owner: 'AelfScanProject',
repo: 'devops',
workflow_id: 'aelf-explorer-server-deploy.yaml',
ref: 'main',
inputs: {
env: 'production',
appName: 'aelf-explorer-backend',
commit_sha: '${{ github.ref_name }}',
}
})
96 changes: 96 additions & 0 deletions .github/workflows/deploy-testnet-pre.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
name: Build and Deploy Testnet Pre

on:
push:
branches:
- "pre-release/*"
env:
DOTNET_INSTALL_DIR: "./.dotnet"

jobs:
publish:
runs-on: aelfscan-runner
strategy:
matrix:
servicename:
[
AElfScanServer.HttpApi.Host,
]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: "8.0"
- run: dotnet publish src/${{ matrix.servicename }}/${{ matrix.servicename }}.csproj -o out/${{ matrix.servicename }}
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.servicename }}
path: out/${{ matrix.servicename }}
retention-days: 1
build-and-push-image:
needs: publish
runs-on: aelfscan-runner
strategy:
matrix:
servicename:
[
AElfScanServer.HttpApi.Host,
]
permissions:
contents: read
outputs:
short_sha: ${{ steps.vars.outputs.short_sha }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set short git commit SHA
id: vars
run: |
calculatedSha=$(git rev-parse --short ${{ github.sha }})
echo "short_sha=$calculatedSha" >> "$GITHUB_OUTPUT"
- name: Download a single artifact
uses: actions/download-artifact@v4
with:
name: ${{ matrix.servicename }}
path: out/${{ matrix.servicename }}
- name: Create image tag
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ secrets.REPOSITORY_REGION }}-docker.pkg.dev/${{ secrets.PROJECT_ID }}/${{ secrets.REPOSITORY }}/${{ matrix.servicename }}
tags: |
type=sha
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
push: true
build-args: |
servicename=${{ matrix.servicename }}
platforms: linux/amd64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

dispatch:
runs-on: aelfscan-runner
needs: build-and-push-image
steps:
- name: Deploy
uses: actions/github-script@v6
with:
github-token: ${{ secrets.TOK }}
script: |
await github.rest.actions.createWorkflowDispatch({
owner: 'AelfScanProject',
repo: 'devops',
workflow_id: 'aelf-explorer-server-deploy.yaml',
ref: 'main',
inputs: {
env: 'testnet',
appName: 'aelf-explorer-httpapi-host-pre',
commit_sha: 'sha-${{ needs.build-and-push-image.outputs.short_sha }}',
}
})
122 changes: 122 additions & 0 deletions .github/workflows/deploy-testnet.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
name: Build and Deploy Testnet

on:
workflow_dispatch:
inputs:
servicename:
description: 'Select service to build and deploy'
required: true
default: 'AElfScanServer.Worker'
type: choice
options:
- AElfScanServer.Worker
- AElfScanServer.HttpApi.Host
- AElfScanServer.Silo
- AElfScanServer.AuthServer
- AElfScanServer.DbMigrator

env:
DOTNET_INSTALL_DIR: "./.dotnet"

jobs:
publish:
runs-on: aelfscan-runner
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: "8.0"
- run: dotnet publish src/${{ github.event.inputs.servicename}}/${{ github.event.inputs.servicename }}.csproj -o out/${{ github.event.inputs.servicename }}
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ github.event.inputs.servicename }}
path: out/${{ github.event.inputs.servicename }}
retention-days: 1

build-and-push-image:
needs: publish
runs-on: aelfscan-runner
permissions:
contents: read
outputs:
short_sha: ${{ steps.vars.outputs.short_sha }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set short git commit SHA
id: vars
run: |
calculatedSha=$(git rev-parse --short ${{ github.sha }})
echo "short_sha=$calculatedSha" >> "$GITHUB_OUTPUT"
- name: Download a single artifact
uses: actions/download-artifact@v4
with:
name: ${{ github.event.inputs.servicename }}
path: out/${{ github.event.inputs.servicename }}
- name: Create image tag
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ secrets.REPOSITORY_REGION }}-docker.pkg.dev/${{ secrets.PROJECT_ID }}/${{ secrets.REPOSITORY }}/${{ github.event.inputs.servicename }}
tags: |
type=sha
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
push: true
build-args: |
servicename=${{ github.event.inputs.servicename }}
platforms: linux/amd64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

dispatch:
runs-on: aelfscan-runner
needs: build-and-push-image
steps:
- name: Map servicename to appName
id: map-appname
run: |
case "${{ github.event.inputs.servicename }}" in
"AElfScanServer.HttpApi.Host")
appName="aelf-explorer-httpapi-host"
;;
"AElfScanServer.Worker")
appName="aelf-explorer-worker"
;;
"AElfScanServer.Silo")
appName="aelf-explorer-silo"
;;
"AElfScanServer.AuthServer")
appName="aelf-explorer-authserver"
;;
"AElfScanServer.DbMigrator")
appName="aelf-explorer-dbmigrator"
;;
*)
echo "Unknown service name: ${{ github.event.inputs.servicename }}"
exit 1
;;
esac
echo "appName=$appName" >> "$GITHUB_ENV"

- name: Deploy
uses: actions/github-script@v6
with:
github-token: ${{ secrets.TOK }}
script: |
await github.rest.actions.createWorkflowDispatch({
owner: 'AelfScanProject',
repo: 'devops',
workflow_id: 'aelf-explorer-server-deploy.yaml',
ref: 'main',
inputs: {
env: 'testnet',
appName: process.env.appName,
commit_sha: 'sha-${{ needs.build-and-push-image.outputs.short_sha }}',
}
})
Loading
Loading