update deploy
This commit is contained in:
parent
e94eea6d3f
commit
822f38ee40
@ -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
|
||||||
|
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ services:
|
|||||||
hub:
|
hub:
|
||||||
container_name: hub
|
container_name: hub
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
image: gitea.pena/penaside/front-hub/staging:$GITHUB_RUN_NUMBER
|
image: gitea.pena/penaside/front-hub/staging:latest
|
||||||
hostname: hub
|
hostname: hub
|
||||||
tty: true
|
tty: true
|
||||||
|
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
"pre-commit": "npm run type-check",
|
"pre-commit": "npm run type-check",
|
||||||
"test": "craco test --env=node --transformIgnorePatterns \"node_modules/(?!@frontend)/\"",
|
"test": "craco test --env=node --transformIgnorePatterns \"node_modules/(?!@frontend)/\"",
|
||||||
"test:cart": "vitest ./src/utils/calcCart",
|
"test:cart": "vitest ./src/utils/calcCart",
|
||||||
|
"deploy": "docker login gitea.pena && docker build -t gitea.pena/squiz/front-hub/$(git branch --show-current):latest . && docker push gitea.pena/squiz/front-hub/$(git branch --show-current):latest",
|
||||||
"eject": "craco eject",
|
"eject": "craco eject",
|
||||||
"test:cypress": "start-server-and-test start http://localhost:3000 cypress",
|
"test:cypress": "start-server-and-test start http://localhost:3000 cypress",
|
||||||
"cypress": "cypress open",
|
"cypress": "cypress open",
|
||||||
|
Loading…
Reference in New Issue
Block a user