add deploy workflow
This commit is contained in:
parent
a5570e29c4
commit
851af39e18
34
.gitea/workflows/deploy.yml
Normal file
34
.gitea/workflows/deploy.yml
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
name: Deploy
|
||||||
|
run-name: ${{ gitea.actor }} build image and push to container registry
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- 'main'
|
||||||
|
- 'staging'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
CreateImage:
|
||||||
|
runs-on: [frontstaging]
|
||||||
|
uses: http://gitea.pena/PenaDevops/actions.git/.gitea/workflows/build-image.yml@v1.1.6-p
|
||||||
|
with:
|
||||||
|
runner: frontstaging
|
||||||
|
secrets:
|
||||||
|
REGISTRY_USER: ${{ secrets.REGISTRY_USER }}
|
||||||
|
REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }}
|
||||||
|
DeployService:
|
||||||
|
runs-on: [frontstaging]
|
||||||
|
container:
|
||||||
|
image: gitea.pena:3000/penadevops/container-images/node-compose:main
|
||||||
|
env:
|
||||||
|
GITHUB_RUN_NUMBER: "${{ inputs.actionid }}"
|
||||||
|
volumes:
|
||||||
|
- /run/user/1000/podman/podman.sock:/run/user/1000/podman/podman.sock
|
||||||
|
steps:
|
||||||
|
- name: Check out repository code
|
||||||
|
uses: http://gitea.pena:3000/PenaDevops/actions.git/checkout@v1
|
||||||
|
- run: printenv
|
||||||
|
- run: GITHUB_RUN_NUMBER=${{ gitea.run_id }} compose -f deployments/${{ gitea.ref_name }}/docker-compose.yaml up -d
|
||||||
|
# uses: http://gitea.pena/PenaDevops/actions.git/.gitea/workflows/deploy.yml@v1.1.6-p
|
||||||
|
# with:
|
||||||
|
# runner: frontstaging
|
14
.gitea/workflows/lint.yml
Normal file
14
.gitea/workflows/lint.yml
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
name: Lint
|
||||||
|
run-name: ${{ gitea.actor }} produce linting
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- 'sdev'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
Lint:
|
||||||
|
runs-on: [hubstaging]
|
||||||
|
uses: http://gitea.pena/PenaDevops/actions.git/.gitea/workflows/lint.yml@v1.1.2
|
||||||
|
with:
|
||||||
|
runner: hubstaging
|
@ -1,4 +1,4 @@
|
|||||||
FROM penahub.gitlab.yandexcloud.net:5050/devops/dockerhub-backup/node as build
|
FROM gitea.pena/penadevops/container-images/node:main as build
|
||||||
|
|
||||||
RUN apk update && rm -rf /var/cache/apk/*
|
RUN apk update && rm -rf /var/cache/apk/*
|
||||||
WORKDIR /usr/app
|
WORKDIR /usr/app
|
||||||
@ -8,7 +8,7 @@ RUN yarn install --ignore-scripts --non-interactive --frozen-lockfile && yarn ca
|
|||||||
RUN yarn build
|
RUN yarn build
|
||||||
|
|
||||||
|
|
||||||
FROM penahub.gitlab.yandexcloud.net:5050/devops/dockerhub-backup/nginx as result
|
FROM gitea.pena/penadevops/container-images/nginx:main as result
|
||||||
WORKDIR /usr/share/nginx/html
|
WORKDIR /usr/share/nginx/html
|
||||||
COPY --from=build /usr/app/build/ /usr/share/nginx/html
|
COPY --from=build /usr/app/build/ /usr/share/nginx/html
|
||||||
COPY hub.conf /etc/nginx/conf.d/default.conf
|
COPY hub.conf /etc/nginx/conf.d/default.conf
|
||||||
|
Loading…
Reference in New Issue
Block a user