Adjusting conditions for Renovate deploy job; also adding in .env generation.
This commit is contained in:
@@ -7,16 +7,25 @@ on:
|
|||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
|
||||||
|
env:
|
||||||
|
HC_VAULT_VERSION: "1.18.0"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
deploy:
|
deploy:
|
||||||
if: |
|
if: |
|
||||||
github.event.pull_request.merged == true &&
|
github.event.pull_request.merged == true &&
|
||||||
github.event.pull_request.user.login == 'renovate-bot'
|
github.event.pull_request.user.login == 'renovate-bot' &&
|
||||||
|
startsWith(github.event.pull_request.head.ref, 'renovate/docker-compose')
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Check out code
|
- name: Check out code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Install Vault
|
||||||
|
uses: cpanato/vault-installer@main
|
||||||
|
with:
|
||||||
|
version: ${{ env.HC_VAULT_VERSION }}
|
||||||
|
|
||||||
- name: Detect Renovate update type
|
- name: Detect Renovate update type
|
||||||
id: detect-update
|
id: detect-update
|
||||||
env:
|
env:
|
||||||
@@ -74,13 +83,17 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
echo -e "${{ steps.services.outputs.docker_svc_list }}"
|
echo -e "${{ steps.services.outputs.docker_svc_list }}"
|
||||||
|
|
||||||
|
- name: Generate .env file for Docker Compose
|
||||||
|
run: |
|
||||||
|
vault kv get -format=json rinoa-docker/env | jq -r '.data.data' | jq -r 'keys[] as $k | "\($k)='\''\(.[$k])'\''"' > .env
|
||||||
|
|
||||||
- name: Gotify Notification
|
- name: Gotify Notification
|
||||||
uses: eikendev/gotify-action@master
|
uses: eikendev/gotify-action@master
|
||||||
with:
|
with:
|
||||||
gotify_api_base: '${{ secrets.RINOA_GOTIFY_URL }}'
|
gotify_api_base: "${{ secrets.RINOA_GOTIFY_URL }}"
|
||||||
gotify_app_token: '${{ secrets.RINOA_RUNNER_GOTIFY_TOKEN }}'
|
gotify_app_token: "${{ secrets.RINOA_RUNNER_GOTIFY_TOKEN }}"
|
||||||
notification_title: 'GITEA: [RENOVATE] Docker Compose Deployment @ Rinoa'
|
notification_title: "GITEA: [RENOVATE] Docker Compose Deployment @ Rinoa"
|
||||||
notification_message: 'Starting Docker Compose run...'
|
notification_message: "Starting Docker Compose run..."
|
||||||
|
|
||||||
- name: Docker Compose Deployment
|
- name: Docker Compose Deployment
|
||||||
uses: hoverkraft-tech/compose-action@v2.2.0
|
uses: hoverkraft-tech/compose-action@v2.2.0
|
||||||
@@ -105,7 +118,7 @@ jobs:
|
|||||||
- name: Gotify Notification
|
- name: Gotify Notification
|
||||||
uses: eikendev/gotify-action@master
|
uses: eikendev/gotify-action@master
|
||||||
with:
|
with:
|
||||||
gotify_api_base: '${{ secrets.RINOA_GOTIFY_URL }}'
|
gotify_api_base: "${{ secrets.RINOA_GOTIFY_URL }}"
|
||||||
gotify_app_token: '${{ secrets.RINOA_RUNNER_GOTIFY_TOKEN }}'
|
gotify_app_token: "${{ secrets.RINOA_RUNNER_GOTIFY_TOKEN }}"
|
||||||
notification_title: 'GITEA: [RENOVATE] Docker Compose Deployment @ Rinoa'
|
notification_title: "GITEA: [RENOVATE] Docker Compose Deployment @ Rinoa"
|
||||||
notification_message: 'Deployment completed successfully.'
|
notification_message: "Deployment completed successfully."
|
||||||
|
|||||||
Reference in New Issue
Block a user