Add CI for lint, build and docker image publish

This commit is contained in:
Nabarun 2025-07-11 12:40:16 +05:30
parent 22ea5b3776
commit a5e53b4857
2 changed files with 61 additions and 0 deletions

View File

@ -0,0 +1,33 @@
name: Publish wallet docker image on release
# on:
# release:
# types: [published]
on:
pull_request:
branches: [ main ]
jobs:
build:
name: Run docker build and publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Run docker build
run: docker build -t laconic-wallet-web -f stack/stack-orchestrator/container-build/cerc-laconic-wallet-web/Dockerfile .
- name: Get the version
id: vars
run: |
echo ::set-output name=sha::$(echo ${GITHUB_SHA:0:7})
# echo ::set-output name=tag::$(echo ${GITHUB_REF#refs/tags/})
- name: Tag docker image
run: docker tag laconic-wallet-web git.vdb.to/laconicnetwork/laconic-wallet-web:${{steps.vars.outputs.sha}}
# - name: Tag docker image
# run: docker tag git.vdb.to/laconicnetwork/laconic-wallet-web:${{steps.vars.outputs.sha}} git.vdb.to/laconicnetwork/laconic-wallet-web:${{steps.vars.outputs.tag}}
- name: Docker Login
run: echo ${{ secrets.CICD_PUBLISH_TOKEN }} | docker login https://git.vdb.to -u laconiccicd --password-stdin
- name: Docker Push
run: docker push git.vdb.to/laconicnetwork/laconic-wallet-web:${{steps.vars.outputs.sha}}
# - name: Docker Push TAGGED
# run: docker push git.vdb.to/laconicnetwork/laconic-wallet-web:${{steps.vars.outputs.tag}}

View File

@ -0,0 +1,28 @@
name: Lint and Build
on:
pull_request:
branches: [ main ]
jobs:
lint-and-build:
name: Run lint and build checks
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '22'
cache: 'yarn'
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Run ESLint
run: yarn lint
- name: Run build
run: yarn build