docker action yaml

This commit is contained in:
2024-12-28 20:32:19 +01:00
parent 712baefa7f
commit 94e5973f88

View File

@@ -1,3 +1,39 @@
name: Build and Deploy develop
on: [workflow_dispatch]
on:
push:
branches:
- develop
jobs:
builds:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '20'
- name: Install dependencies
run: |
npm install
npm install -g @angular/cli
- name: Build Angular project
run: ng build --configuration=production
- name: Build Docker image
run: |
docker build -t 192.168.2.28:5050/tusha-fe:latest .
- name: Push Docker image
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
run: |
echo "${DOCKER_PASSWORD}" | docker login -u "${DOCKER_USERNAME}" --password-stdin
docker push 192.168.2.28:5050/tusha-fe:latest