update deploy
This commit is contained in:
parent
84f1011de0
commit
e2ba7218e8
@ -2,25 +2,30 @@ name: Deploy
|
|||||||
run-name: ${{ gitea.actor }} build image and push to container registry
|
run-name: ${{ gitea.actor }} build image and push to container registry
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
registry_package:
|
||||||
branches:
|
types: [published]
|
||||||
- 'staging'
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
CreateImage:
|
# CreateImage:
|
||||||
runs-on: [skeris]
|
# runs-on: [skeris]
|
||||||
uses: http://gitea.pena/PenaDevops/actions.git/.gitea/workflows/build-image.yml@v1.1.6-p
|
# uses: http://gitea.pena/PenaDevops/actions.git/.gitea/workflows/build-image.yml@v1.1.6-p
|
||||||
with:
|
# with:
|
||||||
runner: skeris
|
# runner: skeris
|
||||||
secrets:
|
# secrets:
|
||||||
REGISTRY_USER: ${{ secrets.REGISTRY_USER }}
|
# REGISTRY_USER: ${{ secrets.REGISTRY_USER }}
|
||||||
REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }}
|
# REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }}
|
||||||
DeployService:
|
DeployService:
|
||||||
|
if: contains(github.event.package.name, 'staging')
|
||||||
runs-on: [frontstaging]
|
runs-on: [frontstaging]
|
||||||
needs: CreateImage
|
container:
|
||||||
uses: http://gitea.pena/PenaDevops/actions.git/.gitea/workflows/deploy.yml@v1.1.4-p7
|
image: gitea.pena:3000/penadevops/container-images/node-compose:main
|
||||||
with:
|
env:
|
||||||
runner: frontstaging
|
GITHUB_RUN_NUMBER: "${{ inputs.actionid }}"
|
||||||
actionid: ${{ gitea.run_id }}
|
volumes:
|
||||||
|
- /run/user/1000/docker/docker.sock:/run/user/1000/docker/docker.sock
|
||||||
|
steps:
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: http://gitea.pena:3000/PenaDevops/actions.git/checkout@v1
|
||||||
|
- run: compose -f deployments/staging/docker-compose.yaml up -d
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,13 +0,0 @@
|
|||||||
FROM gitea.pena/penadevops/container-images/node:main as build
|
|
||||||
|
|
||||||
WORKDIR /usr/app
|
|
||||||
COPY . .
|
|
||||||
|
|
||||||
|
|
||||||
RUN npm install --force && yarn cache clean
|
|
||||||
RUN psstat.sh "npm run build"
|
|
||||||
|
|
||||||
FROM gitea.pena/penadevops/container-images/nginx:main as result
|
|
||||||
WORKDIR /usr/share/nginx/html
|
|
||||||
COPY --from=build /usr/app/build/ /usr/share/nginx/html
|
|
||||||
COPY hub.conf /etc/nginx/conf.d/default.conf
|
|
13
Dockerfile
13
Dockerfile
@ -0,0 +1,13 @@
|
|||||||
|
FROM gitea.pena/penadevops/container-images/node:main as build
|
||||||
|
|
||||||
|
WORKDIR /usr/app
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
|
||||||
|
RUN npm install --force && yarn cache clean
|
||||||
|
RUN psstat.sh "npm run build"
|
||||||
|
|
||||||
|
FROM gitea.pena/penadevops/container-images/nginx:main as result
|
||||||
|
WORKDIR /usr/share/nginx/html
|
||||||
|
COPY --from=build /usr/app/build/ /usr/share/nginx/html
|
||||||
|
COPY hub.conf /etc/nginx/conf.d/default.conf
|
@ -2,6 +2,6 @@ services:
|
|||||||
squiz:
|
squiz:
|
||||||
container_name: squiz
|
container_name: squiz
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
image: gitea.pena/squiz/frontpanel/staging:$GITHUB_RUN_NUMBER
|
image: gitea.pena/squiz/frontpanel/staging:latest
|
||||||
hostname: squiz
|
hostname: squiz
|
||||||
tty: true
|
tty: true
|
||||||
|
@ -69,6 +69,7 @@
|
|||||||
"test": "craco test",
|
"test": "craco test",
|
||||||
"eject": "craco eject",
|
"eject": "craco eject",
|
||||||
"code:format": "prettier --write --ignore-unknown",
|
"code:format": "prettier --write --ignore-unknown",
|
||||||
|
"deploy": "docker login gitea.pena && docker build -t gitea.pena/squiz/frontanswerer/$(git branch --show-current):latest . && docker push gitea.pena/squiz/frontanswerer/$(git branch --show-current):latest",
|
||||||
"prepare": "husky install",
|
"prepare": "husky install",
|
||||||
"cypress:open": "cypress open",
|
"cypress:open": "cypress open",
|
||||||
"cypress:run": "cypress run"
|
"cypress:run": "cypress run"
|
||||||
|
Loading…
Reference in New Issue
Block a user