diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml new file mode 100644 index 0000000..e367c6d --- /dev/null +++ b/.gitea/workflows/deploy.yml @@ -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 diff --git a/.gitea/workflows/lint.yml b/.gitea/workflows/lint.yml new file mode 100644 index 0000000..52bcf13 --- /dev/null +++ b/.gitea/workflows/lint.yml @@ -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 diff --git a/Dockerfile b/Dockerfile index 9112719..b5938f7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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/* WORKDIR /usr/app @@ -9,7 +9,7 @@ RUN yarn build RUN yarn build:widget -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 COPY --from=build /usr/app/dist/ /usr/share/nginx/html COPY --from=build /usr/app/widget/widget.js /usr/share/nginx/html/export/pub.js diff --git a/deployments/staging/docker-compose.yaml b/deployments/staging/docker-compose.yaml index e576e61..d2f9e51 100644 --- a/deployments/staging/docker-compose.yaml +++ b/deployments/staging/docker-compose.yaml @@ -6,6 +6,6 @@ services: labels: com.pena.domains: s.hbpn.link com.pena.front_headers: "Access-Control-Allow-Origin $$http_origin always" - image: $CI_REGISTRY_IMAGE/staging:$CI_COMMIT_REF_SLUG.$CI_PIPELINE_ID + image: gitea.pena:3000/penaside/front-hub/staging:$GITHUB_RUN_NUMBER hostname: respondent tty: true