cicd
This commit is contained in:
parent
2d2dc61238
commit
0b36e655d0
34
workflows/ci.yml
Normal file
34
workflows/ci.yml
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
name: CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
npm install
|
||||||
|
|
||||||
|
- name: Run tests
|
||||||
|
run: |
|
||||||
|
npm test
|
||||||
|
|
||||||
|
- name: Build Docker image
|
||||||
|
run: |
|
||||||
|
docker build -t my-app .
|
||||||
|
|
||||||
|
- name: Push Docker image to Gitea registry
|
||||||
|
run: |
|
||||||
|
echo ${{ secrets.DOCKER_PASSWORD }} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin
|
||||||
|
docker push my-app:latest
|
2
workflows/gitea-ci.yaml
Normal file
2
workflows/gitea-ci.yaml
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
name: Build And Test
|
||||||
|
run-name: ${{ gitea.actor }} is runs ci pipeline
|
Loading…
x
Reference in New Issue
Block a user