diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml new file mode 100644 index 0000000..e9fea49 --- /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..655c43d --- /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 ee3f09e..8700c9e 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 @@ -8,7 +8,7 @@ RUN yarn install --ignore-scripts --non-interactive --frozen-lockfile && yarn ca 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 COPY --from=build /usr/app/build/ /usr/share/nginx/html COPY hub.conf /etc/nginx/conf.d/default.conf