This commit is contained in:
parent
60c1e61f73
commit
b99b0b8299
@ -3,32 +3,11 @@ name: TDevOPsCICD
|
|||||||
on: [push]
|
on: [push]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
lint-and-test:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
node-version: [18.x, 20.x]
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
- name: Use Node.js ${{ matrix.node-version }}
|
|
||||||
uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: ${{ matrix.node-version }}
|
|
||||||
cache: 'npm'
|
|
||||||
- run: npm ci
|
|
||||||
- run: npm run lint
|
|
||||||
- run: npm test
|
|
||||||
env:
|
|
||||||
NODE_ENV: test
|
|
||||||
|
|
||||||
build-image:
|
build-image:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: lint-and-test
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Build Docker Image
|
- name: Build Binary
|
||||||
run: |
|
run: |
|
||||||
docker build -t my-registry.com/my-node-app:${{ github.sha }} .
|
echo ${{ github.ref_name }} ${{ github.sha }}
|
||||||
docker push my-registry.com/my-node-app:${{ github.sha }}
|
kit
|
||||||
env:
|
|
||||||
DOCKER_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }}
|
|
Loading…
Reference in New Issue
Block a user