diff --git a/.github/workflows/create_cert.yml b/.github/workflows/create_cert.yml new file mode 100644 index 000000000..ea76b9c04 --- /dev/null +++ b/.github/workflows/create_cert.yml @@ -0,0 +1,25 @@ +name: Create cert +on: [workflow_dispatch] + +jobs: + update_certs: + runs-on: vscale + steps: + - uses: actions/checkout@master + - name: Configure secrets + run: | + echo "$S3_KEY"|base64 -d > aws-key.properties + mv docker-compose-run.yml docker-compose.yml + sed -i -e "s/_YANDEX_AUTH_TOKEN_/\\$YANDEX_AUTH_TOKEN/" docker-compose.yml + sed -i -e "s/_YANDEX_FOLDER_ID_/\\$YANDEX_FOLDER_ID/" docker-compose.yml + sed -i -e "s/_POSTGRES_PASSWORD_/\\$POSTGRES_PASSWORD/" docker-compose.yml + sed -i -e "s/_API_GITHUB_TOKEN_/\\$API_GITHUB_TOKEN/" docker-compose.yml + env: + S3_KEY: ${{ secrets.S3_KEY }} + YANDEX_AUTH_TOKEN: ${{ secrets.YANDEX_AUTH_TOKEN }} + YANDEX_FOLDER_ID: ${{ secrets.YANDEX_FOLDER_ID }} + POSTGRES_PASSWORD: ${{ secrets.POSTGRES_PASSWORD }} + API_GITHUB_TOKEN: ${{ secrets.API_GITHUB_TOKEN }} + - name: Create cert + run: | + docker-compose run --rm certbot certonly --webroot --webroot-path=/var/www/html --email brainupproject@yandex.ru -d brainup.fun