Private
Public Access
Update build.yaml
This commit is contained in:
1 parent
2e18319893
commit
1fd0523798
1 file changed
+28
-32
+28
-32
@@ -1,4 +1,4 @@
|
|||||||
name: Build
|
name: Build
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@@ -10,40 +10,36 @@ jobs:
|
|||||||
git clone https://${{ secrets.GIT_USER }}:${{ secrets.REGISTRY_PASS }}@fedesrv.ddns.net/git/${{ github.repository }}.git .
|
git clone https://${{ secrets.GIT_USER }}:${{ secrets.REGISTRY_PASS }}@fedesrv.ddns.net/git/${{ github.repository }}.git .
|
||||||
git checkout ${{ github.sha }}
|
git checkout ${{ github.sha }}
|
||||||
|
|
||||||
|
- name: Login al registry
|
||||||
- name: Setup Go 1.21.x
|
uses: docker/login-action@v3
|
||||||
uses: actions/setup-go@v5
|
|
||||||
with:
|
with:
|
||||||
# Semantic version range syntax or exact version of Go
|
registry: fedesrv.ddns.net
|
||||||
go-version: '1.21.7'
|
username: ${{ secrets.REGISTRY_USER }}
|
||||||
|
password: ${{ secrets.REGISTRY_PASS }}
|
||||||
|
|
||||||
- name: Install dependencias go
|
- name: Set up Docker Buildx
|
||||||
run: |
|
uses: docker/setup-buildx-action@v3
|
||||||
cd back
|
|
||||||
go get .
|
|
||||||
|
|
||||||
- name: build binary go
|
- name: Build & Push go-api
|
||||||
run: go build -v . -o repuestera-back
|
uses: docker/build-push-action@v5
|
||||||
|
|
||||||
- name: Setup Node.js
|
|
||||||
uses: actions/setup-node@v4
|
|
||||||
with:
|
with:
|
||||||
node-version: '22'
|
context: ./back
|
||||||
|
dockerfile: ./back/Dockerfile
|
||||||
|
push: true
|
||||||
|
tags: fedesrv.ddns.net/repuestera/go-api:latest
|
||||||
|
|
||||||
- name: build proyect
|
- name: Build & Push svelte
|
||||||
run: |
|
uses: docker/build-push-action@v5
|
||||||
cd .. && cd front
|
|
||||||
npm install
|
|
||||||
npm run build
|
|
||||||
|
|
||||||
- name: Generar carpeta
|
|
||||||
run: mkdir -p build
|
|
||||||
|
|
||||||
- name: Generar fecha
|
|
||||||
run: echo "BUILD_DATE=$(date +'%Y-%m-%d_%H-%M')" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Upload dist
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
with:
|
||||||
name: Repuestera-${{ env.BUILD_DATE }}
|
context: ./front
|
||||||
path: dist
|
dockerfile: ./front/Dockerfile
|
||||||
|
push: true
|
||||||
|
tags: fedesrv.ddns.net/repuestera/svelte:latest
|
||||||
|
|
||||||
|
- name: Build & Push nginx
|
||||||
|
uses: docker/build-push-action@v5
|
||||||
|
with:
|
||||||
|
context: ./nginx
|
||||||
|
dockerfile: ./nginx/Dockerfile
|
||||||
|
push: true
|
||||||
|
tags: fedesrv.ddns.net/repuestera/nginx:latest
|
||||||
Reference in new issue
Block a user