Update TLS certificates for selectel #215
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update TLS certificates for vscale | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 0 15 * *' | |
jobs: | |
update_certs: | |
runs-on: vscale | |
steps: | |
- uses: actions/checkout@v4 | |
- 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: Update certs | |
run: | | |
docker-compose pull | |
docker-compose run --rm certbot renew --allow-subset-of-names | |
docker-compose restart brn_fe_with_tls | |
docker image prune -af |