pull/2/head
dmitry.kirdyashkin 2023-07-10 21:02:13 +03:00
parent 30f1598139
commit 7a5321e603
3 changed files with 66 additions and 1 deletions

15
.drone.yml 100644
View File

@ -0,0 +1,15 @@
---
kind: pipeline
name: create new release
steps:
- name: create archive
image: mcr.microsoft.com/powershell:lts-7.2-debian-10
environment:
USERNAME:
from_secret: drone_repo_user
PASSWORD:
from_secret: drone_repo_password
commands:
- |
pwsh -c Get-ChildItem .\src -Recurse -Depth 0 | Compress-Archive -Force -DestinationPath ".\resources\upload\module.zip"

View File

@ -0,0 +1,50 @@
name: Publish Docker image
on:
push:
branches:
- 'main'
env:
REPOSITORY: ${{ gitea.repository }}
BUILD_NUMBER: ${{ gitea.run_number }}
DOCKER_REPO_LOGIN: ${{ secrets.DOCKER_REPO_LOGIN }}
DOCKER_REPO_PASSWORD: ${{ secrets.DOCKER_REPO_PASSWORD }}
PORTAINER_TOKEN: ${{ secrets.PORTAINER_TOKEN }}
jobs:
publish_image:
name: Publish image
runs-on: ubuntu-latest
container:
image: gitea.kdiva.ru/infrastructure/debian-docker
credentials:
username: ${{ env.DOCKER_REPO_LOGIN }}
password: ${{ env.DOCKER_REPO_PASSWORD }}
steps:
# - name: Checkout
- name: Checkout ${{env.REPOSITORY}}
uses: actions/checkout@v3
with:
# repository: infrastructure/nginx
repository: ${{env.REPOSITORY}}
github-server-url: https://gitea.kdiva.ru
- name: Publish image
uses: https://gitea.kdiva.ru/actions/publish-image@3adc1763ef252a10feb1eb667e768f0a5d80335b
with:
DOCKER_REPO_LOGIN: ${{ env.DOCKER_REPO_LOGIN }}
DOCKER_REPO_PASSWORD: ${{ env.DOCKER_REPO_PASSWORD }}
redeploy_stack:
name: Redeploy stack
runs-on: ubuntu-latest
needs: "Publish image"
steps:
- name: Redeploy stack
uses: https://gitea.kdiva.ru/actions/portainer-redeploy@4a0951d52d94ac6504dc20321d6d45f66acd1cc0
with:
PORTAINER_TOKEN: ${{ env.PORTAINER_TOKEN }}

@ -1 +1 @@
Subproject commit b1524b6710ab92045769dc50d63a85eb576197f8
Subproject commit 153edfd6d4c91aa957c0b14171f5c676aa4cd58a