Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 738f58f165 |
+4
-33
@@ -1,5 +1,4 @@
|
||||
name: Gitea Branch PR & Ansible Deployment
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
@@ -9,7 +8,6 @@ on:
|
||||
- '**.j2'
|
||||
- '**/pr-ansible-config-deployment.yaml'
|
||||
- 'ansible/**.yml'
|
||||
|
||||
jobs:
|
||||
check-and-create-pr:
|
||||
if: github.ref != 'refs/heads/main'
|
||||
@@ -17,24 +15,21 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v5
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Cache tea CLI
|
||||
id: cache-tea
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: /opt/hostedtoolcache/tea/0.9.2/x64
|
||||
key: tea-${{ runner.os }}-0.9.2
|
||||
|
||||
- name: Install tea
|
||||
uses: supplypike/setup-bin@v4
|
||||
with:
|
||||
uri: 'https://gitea.com/gitea/tea/releases/download/v0.9.2/tea-0.9.2-linux-amd64'
|
||||
name: 'tea'
|
||||
version: '0.9.2'
|
||||
|
||||
- name: Gotify Notification
|
||||
uses: eikendev/gotify-action@master
|
||||
with:
|
||||
@@ -42,7 +37,6 @@ jobs:
|
||||
gotify_app_token: '${{ secrets.RINOA_RUNNER_GOTIFY_TOKEN }}'
|
||||
notification_title: 'GITEA: PR Check'
|
||||
notification_message: 'Checking for existing PR... 🔍'
|
||||
|
||||
- name: Check if open PR exists
|
||||
id: check-opened-pr-step
|
||||
continue-on-error: true
|
||||
@@ -50,7 +44,6 @@ jobs:
|
||||
tea login add --name gitea-rinoa --url "${{ secrets.RINOA_GITEA_URL }}" --user gitea-sonarqube-bot --password "${{ secrets.BOT_GITEA_PASSWORD }}" --token ${{ secrets.BOT_GITEA_TOKEN }}
|
||||
pr_exists=$(tea pr list --repo ${{ github.repository }} --state open --fields index,title,head | egrep '\[ANSIBLE\].*${{ github.ref_name }}' | tail -1 | wc -l)
|
||||
echo "exists=$pr_exists" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Create PR
|
||||
if: ${{ steps.check-opened-pr-step.outputs.exists == '0' }}
|
||||
run: |
|
||||
@@ -58,7 +51,6 @@ jobs:
|
||||
pr_index_old=$(tea pr ls --repo ${{ github.repository }} --state all --fields index,title,head --output csv | sed -e 's|"||g' | egrep '^[0-9]' | head -1 | awk -F"," '{print $1}')
|
||||
pr_index_new=$(expr ${pr_index_old} + 1)
|
||||
tea pr c -r ${{ github.repository }} -t "[ANSIBLE] Automated PR for ${{ github.ref_name }} - #${pr_index_new}" -d "Automatically created PR for branch: ${{ github.ref_name }}" -a ${{ github.actor }} -L "Ansible Configs.j2"
|
||||
|
||||
- name: Gotify Notification
|
||||
uses: eikendev/gotify-action@master
|
||||
with:
|
||||
@@ -66,7 +58,6 @@ jobs:
|
||||
gotify_app_token: '${{ secrets.RINOA_RUNNER_GOTIFY_TOKEN }}'
|
||||
notification_title: 'GITEA: PR Check'
|
||||
notification_message: 'PR Created 🎟️'
|
||||
|
||||
ansible-dry-run:
|
||||
name: Ansible Dry Run
|
||||
needs: [check-and-create-pr]
|
||||
@@ -77,8 +68,7 @@ jobs:
|
||||
VAULT_NAMESPACE: ""
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v5
|
||||
|
||||
uses: actions/checkout@v4
|
||||
- name: Cache Ansible Galaxy Collections
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
@@ -86,19 +76,15 @@ jobs:
|
||||
key: ${{ runner.os }}-ansible-${{ hashFiles('./ansible/collections/requirements.yml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-ansible-
|
||||
|
||||
- name: Install Ansible
|
||||
uses: alex-oleshkevich/setup-ansible@v1.0.1
|
||||
with:
|
||||
version: "11.4.0"
|
||||
|
||||
- name: Install Vault
|
||||
uses: cpanato/vault-installer@main
|
||||
|
||||
- name: Install hvac
|
||||
run: |
|
||||
pip install hvac
|
||||
|
||||
- name: Gotify Notification
|
||||
uses: eikendev/gotify-action@master
|
||||
with:
|
||||
@@ -106,7 +92,6 @@ jobs:
|
||||
gotify_app_token: '${{ secrets.RINOA_RUNNER_GOTIFY_TOKEN }}'
|
||||
notification_title: 'GITEA: Ansible Config Dry Run @ Rinoa'
|
||||
notification_message: 'Starting Ansible dry run...'
|
||||
|
||||
- name: Ansible Playbook Dry Run
|
||||
uses: dawidd6/action-ansible-playbook@v3
|
||||
with:
|
||||
@@ -118,7 +103,6 @@ jobs:
|
||||
options: |
|
||||
--check
|
||||
--inventory inventory/hosts.yml
|
||||
|
||||
- name: Gotify Notification
|
||||
uses: eikendev/gotify-action@master
|
||||
with:
|
||||
@@ -126,22 +110,19 @@ jobs:
|
||||
gotify_app_token: '${{ secrets.RINOA_RUNNER_GOTIFY_TOKEN }}'
|
||||
notification_title: 'GITEA: Ansible Dry Run @ Rinoa'
|
||||
notification_message: 'Ansible dry run completed successfully.'
|
||||
|
||||
pr-merge:
|
||||
name: PR Merge
|
||||
needs: [ansible-dry-run]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v5
|
||||
|
||||
uses: actions/checkout@v4
|
||||
- name: Install tea
|
||||
uses: supplypike/setup-bin@v4
|
||||
with:
|
||||
uri: 'https://gitea.com/gitea/tea/releases/download/v0.9.2/tea-0.9.2-linux-amd64'
|
||||
name: 'tea'
|
||||
version: '0.9.2'
|
||||
|
||||
- name: PR Merge
|
||||
id: pr_merge
|
||||
run: |
|
||||
@@ -151,7 +132,6 @@ jobs:
|
||||
pr_index=$(tea pr ls --repo ${{ github.repository }} --state open --fields index,title,head,state --output csv | egrep ${{ github.ref_name }} | awk -F"," '{print $1}' | sed -e 's|"||g')
|
||||
tea pr m --repo ${{ github.repository }} --title "Auto Merge of PR ${pr_index} - ${{ github.ref_name }}" --message "Merged by ${{ github.actor }}" ${pr_index}
|
||||
echo "pr_index=${pr_index}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Gotify Notification
|
||||
uses: eikendev/gotify-action@master
|
||||
with:
|
||||
@@ -159,7 +139,6 @@ jobs:
|
||||
gotify_app_token: '${{ secrets.RINOA_RUNNER_GOTIFY_TOKEN }}'
|
||||
notification_title: 'GITEA: PR Merge Successful'
|
||||
notification_message: 'PR #${{ steps.pr_merge.outputs.pr_index }} merged.'
|
||||
|
||||
ansible-config-deploy:
|
||||
name: Ansible Config Deployment
|
||||
runs-on: ubuntu-latest
|
||||
@@ -170,34 +149,28 @@ jobs:
|
||||
DOCKER_HOST: tcp://dockerproxy:2375
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v5
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: main
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: 3.12
|
||||
|
||||
- name: Cache Vault install
|
||||
id: cache-vault
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: /opt/hostedtoolcache/vault/1.18.0/x64
|
||||
key: vault-${{ runner.os }}-1.18.0
|
||||
|
||||
- name: Install Ansible
|
||||
uses: alex-oleshkevich/setup-ansible@v1.0.1
|
||||
with:
|
||||
version: "11.4.0"
|
||||
|
||||
- name: Install Vault
|
||||
uses: cpanato/vault-installer@main
|
||||
|
||||
- name: Install hvac
|
||||
run: |
|
||||
pip install hvac
|
||||
|
||||
- name: Gotify Notification
|
||||
uses: eikendev/gotify-action@master
|
||||
with:
|
||||
@@ -205,7 +178,6 @@ jobs:
|
||||
gotify_app_token: '${{ secrets.RINOA_RUNNER_GOTIFY_TOKEN }}'
|
||||
notification_title: 'GITEA: Ansible Config Deployment @ Rinoa'
|
||||
notification_message: 'Starting config deployment with Ansible...'
|
||||
|
||||
- name: Ansible Playbook Config Deploy
|
||||
uses: dawidd6/action-ansible-playbook@v3
|
||||
with:
|
||||
@@ -216,7 +188,6 @@ jobs:
|
||||
requirements: collections/requirements.yml
|
||||
options: |
|
||||
--inventory inventory/hosts.yml
|
||||
|
||||
- name: Gotify Notification
|
||||
uses: eikendev/gotify-action@master
|
||||
with:
|
||||
@@ -1,5 +1,4 @@
|
||||
name: Gitea Branch PR, Cloudflare DNS, README generation, & Docker Deployment
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
@@ -9,12 +8,10 @@ on:
|
||||
- '**/docker-compose.yml'
|
||||
- '**/pr-cloudflare-docker-deploy.yml'
|
||||
- '!ansible/**.yml'
|
||||
|
||||
env:
|
||||
FLARECTL_VERSION: '0.115.0'
|
||||
HC_VAULT_VERSION: '1.20.0'
|
||||
TEA_VERSION: '0.10.1'
|
||||
|
||||
jobs:
|
||||
check-and-create-pr:
|
||||
if: github.ref != 'refs/heads/main'
|
||||
@@ -25,21 +22,18 @@ jobs:
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Cache tea CLI
|
||||
id: cache-tea
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: /opt/hostedtoolcache/tea/${{ env.TEA_VERSION }}/x64
|
||||
key: tea-${{ runner.os }}-${{ env.TEA_VERSION }}
|
||||
|
||||
- name: Install tea
|
||||
uses: supplypike/setup-bin@v4
|
||||
with:
|
||||
uri: https://gitea.com/gitea/tea/releases/download/v${{ env.TEA_VERSION }}/tea-${{ env.TEA_VERSION }}-linux-amd64
|
||||
name: tea
|
||||
version: ${{ env.TEA_VERSION }}
|
||||
|
||||
- name: Gotify Notification
|
||||
uses: eikendev/gotify-action@master
|
||||
with:
|
||||
@@ -47,7 +41,6 @@ jobs:
|
||||
gotify_app_token: '${{ secrets.RINOA_RUNNER_GOTIFY_TOKEN }}'
|
||||
notification_title: 'GITEA: PR Check'
|
||||
notification_message: 'Checking for existing PR... 🔍'
|
||||
|
||||
- name: Check if open PR exists
|
||||
id: check-opened-pr-step
|
||||
continue-on-error: true
|
||||
@@ -55,7 +48,6 @@ jobs:
|
||||
tea login add --name gitea-rinoa --url "${{ secrets.RINOA_GITEA_URL }}" --user gitea-sonarqube-bot --password "${{ secrets.BOT_GITEA_PASSWORD }}" --token ${{ secrets.BOT_GITEA_TOKEN }}
|
||||
pr_exists=$(tea pr list --repo ${{ github.repository }} --state open --fields index,title,head | egrep '\[DOCKER\].*${{ github.ref_name }}' | tail -1 | wc -l)
|
||||
echo "exists=$pr_exists" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Create PR
|
||||
if: ${{ steps.check-opened-pr-step.outputs.exists == '0' }}
|
||||
run: |
|
||||
@@ -63,7 +55,6 @@ jobs:
|
||||
pr_index_old=$(tea pr ls --repo ${{ github.repository }} --state all --fields index,title,head --output csv | sed -e 's|"||g' | egrep '^[0-9]' | head -1 | awk -F"," '{print $1}')
|
||||
pr_index_new=$(expr ${pr_index_old} + 1)
|
||||
tea pr c -r ${{ github.repository }} -t "[DOCKER] Automated PR for ${{ github.ref_name }} - #${pr_index_new}" -d "Automatically created PR for branch: ${{ github.ref_name }}" -a ${{ github.actor }} -L "Docker Compose"
|
||||
|
||||
- name: Gotify Notification
|
||||
uses: eikendev/gotify-action@master
|
||||
with:
|
||||
@@ -71,7 +62,6 @@ jobs:
|
||||
gotify_app_token: '${{ secrets.RINOA_RUNNER_GOTIFY_TOKEN }}'
|
||||
notification_title: 'GITEA: PR Check'
|
||||
notification_message: 'PR Created 🎟️'
|
||||
|
||||
generate-service-list:
|
||||
name: Generate list of added/modified/deleted services
|
||||
runs-on: ubuntu-latest
|
||||
@@ -79,14 +69,11 @@ jobs:
|
||||
outputs:
|
||||
svc_deploy_list: ${{ steps.detect_services.outputs.docker_svc_list }}
|
||||
steps:
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Fetch base branch
|
||||
run: |
|
||||
git fetch origin ${{ github.event.pull_request.base.ref }}
|
||||
|
||||
- name: Gotify Notification
|
||||
uses: eikendev/gotify-action@master
|
||||
with:
|
||||
@@ -94,12 +81,10 @@ jobs:
|
||||
gotify_app_token: '${{ secrets.RINOA_RUNNER_GOTIFY_TOKEN }}'
|
||||
notification_title: 'GITEA: Services TBD'
|
||||
notification_message: 'Generating list of services to deploy...'
|
||||
|
||||
- name: Save both versions of docker-compose.yml
|
||||
run: |
|
||||
git show origin/main:docker-compose.yml > docker-compose-main.yml || touch docker-compose-main.yml
|
||||
cp docker-compose.yml docker-compose-head.yml
|
||||
|
||||
- name: Detect added, deleted, and modified services
|
||||
id: detect_services
|
||||
run: |
|
||||
@@ -129,11 +114,9 @@ jobs:
|
||||
echo "docker_svc_list<<EOF" >> "$GITHUB_OUTPUT"
|
||||
echo "$mod_svcs" >> "$GITHUB_OUTPUT"
|
||||
echo "EOF" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: List of Services for (Re)Deployment
|
||||
run: |
|
||||
echo -e "${{ steps.detect_services.outputs.docker_svc_list }}"
|
||||
|
||||
docker-compose-dry-run:
|
||||
name: Docker Compose Dry Run
|
||||
needs: [generate-service-list]
|
||||
@@ -147,24 +130,20 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Login to Gitea Container Registry
|
||||
run: |
|
||||
docker login -u gitea-sonarqube-bot -p ${RINOA_REGISTRY_PASSWORD} git.trez.wtf
|
||||
|
||||
- name: Cache Vault install
|
||||
id: cache-vault
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: /opt/hostedtoolcache/vault/${{ env.HC_VAULT_VERSION }}/x64
|
||||
key: vault-${{ runner.os }}-${{ env.HC_VAULT_VERSION }}
|
||||
|
||||
- name: Install Vault (only if not cached)
|
||||
if: steps.cache-vault.outputs.cache-hit != 'true'
|
||||
uses: cpanato/vault-installer@main
|
||||
with:
|
||||
version: ${{ env.HC_VAULT_VERSION }}
|
||||
|
||||
- name: Gotify Notification
|
||||
uses: eikendev/gotify-action@master
|
||||
with:
|
||||
@@ -172,12 +151,10 @@ jobs:
|
||||
gotify_app_token: '${{ secrets.RINOA_RUNNER_GOTIFY_TOKEN }}'
|
||||
notification_title: 'GITEA: Docker Compose Dry Run @ Rinoa'
|
||||
notification_message: 'Starting Docker Compose dry run...'
|
||||
|
||||
- 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
|
||||
echo ${DOCKER_SVC_LIST}
|
||||
|
||||
- name: Docker Compose Dry Run
|
||||
uses: hoverkraft-tech/compose-action@v2.2.0
|
||||
env:
|
||||
@@ -187,8 +164,7 @@ jobs:
|
||||
${{ needs.generate-service-list.outputs.svc_deploy_list }}
|
||||
up-flags: -d --remove-orphans --dry-run
|
||||
down-flags: --dry-run
|
||||
compose-flags: --dry-run --profile rinoa-apps
|
||||
|
||||
compose-flags: --dry-run
|
||||
- name: Gotify Notification
|
||||
uses: eikendev/gotify-action@master
|
||||
with:
|
||||
@@ -196,7 +172,6 @@ jobs:
|
||||
gotify_app_token: '${{ secrets.RINOA_RUNNER_GOTIFY_TOKEN }}'
|
||||
notification_title: 'GITEA: Docker Compose Dry Run @ Rinoa'
|
||||
notification_message: 'Docker Compose dry run completed successfully.'
|
||||
|
||||
cloudflare-dns-setup:
|
||||
name: Cloudflare DNS Setup
|
||||
needs: [docker-compose-dry-run]
|
||||
@@ -206,20 +181,17 @@ jobs:
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Cache flarectl CLI
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.flarectl
|
||||
key: flarectl-${{ runner.os }}-${{ env.FLARECTL_VERSION }}-${{ hashFiles('workflow-config.yml') }}
|
||||
|
||||
- name: Install flarectl
|
||||
uses: supplypike/setup-bin@v4
|
||||
with:
|
||||
uri: https://github.com/cloudflare/cloudflare-go/releases/download/v${{ env.FLARECTL_VERSION }}/flarectl_${{ env.FLARECTL_VERSION }}_linux_amd64.tar.gz
|
||||
name: flarectl
|
||||
version: ${{ env.FLARECTL_VERSION }}
|
||||
|
||||
- name: Cache Subdomain Files
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
@@ -227,7 +199,6 @@ jobs:
|
||||
compose_subdomains.txt
|
||||
cloudflare_subdomains.txt
|
||||
key: ${{ runner.os }}-subdomains-${{ hashFiles('docker-compose.yml') }}
|
||||
|
||||
- name: Grab Subdomains from Docker Compose & Cloudflare
|
||||
id: grab-subdomains
|
||||
env:
|
||||
@@ -243,7 +214,6 @@ jobs:
|
||||
gotify_app_token: '${{ secrets.RINOA_RUNNER_GOTIFY_TOKEN }}'
|
||||
notification_title: 'GITEA: Cloudflare Setup @ Rinoa'
|
||||
notification_message: 'Starting Cloudflare DNS setup...'
|
||||
|
||||
- name: Compare Subdomains
|
||||
id: compare-subdomains
|
||||
uses: LouisBrunner/diff-action@v2.2.0
|
||||
@@ -253,7 +223,6 @@ jobs:
|
||||
mode: addition
|
||||
tolerance: mixed-better
|
||||
output: domain_compare.txt
|
||||
|
||||
- name: Create Subdomains
|
||||
if: steps.compare-subdomains.outputs.output != ''
|
||||
continue-on-error: true
|
||||
@@ -265,7 +234,6 @@ jobs:
|
||||
echo "Creating $subdomain.trez.wtf..."
|
||||
flarectl dns create --zone "trez.wtf" --name "${subdomain}" --type=CNAME --content "trez.wtf" --proxy true
|
||||
done
|
||||
|
||||
- name: Gotify Notification
|
||||
uses: eikendev/gotify-action@master
|
||||
with:
|
||||
@@ -273,7 +241,6 @@ jobs:
|
||||
gotify_app_token: '${{ secrets.RINOA_RUNNER_GOTIFY_TOKEN }}'
|
||||
notification_title: 'GITEA: Cloudflare Setup @ Rinoa'
|
||||
notification_message: 'Cloudflare DNS setup completed successfully.'
|
||||
|
||||
regenerate-readme-modified-services:
|
||||
name: Update README & Generate List of Modified Services
|
||||
runs-on: ubuntu-latest
|
||||
@@ -281,10 +248,8 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install yq
|
||||
uses: dcarbone/install-yq-action@v1
|
||||
|
||||
- name: Gotify Notification
|
||||
uses: eikendev/gotify-action@master
|
||||
with:
|
||||
@@ -292,30 +257,25 @@ jobs:
|
||||
gotify_app_token: '${{ secrets.RINOA_RUNNER_GOTIFY_TOKEN }}'
|
||||
notification_title: 'GITEA: README Update'
|
||||
notification_message: 'Updating README...'
|
||||
|
||||
- name: Generate service list
|
||||
run: |
|
||||
yq '.services | to_entries | map({"service": .key, "image": .value.image})' docker-compose.yml > services.yml
|
||||
|
||||
- name: Generate Markdown Table
|
||||
uses: gazab/create-markdown-table@v1
|
||||
id: service-table
|
||||
with:
|
||||
file: ./services.yml
|
||||
|
||||
- name: Regenerate README
|
||||
run: |
|
||||
echo "# List of Services" > README.md
|
||||
echo -e "\n\n" >> README.md
|
||||
echo "${{ steps.service-table.outputs.table }}" >> README.md
|
||||
|
||||
- name: Add/Commit README.md
|
||||
id: commit-readme
|
||||
uses: EndBug/add-and-commit@v9
|
||||
with:
|
||||
message: "chore: Update README"
|
||||
add: "README.md"
|
||||
|
||||
- name: Gotify Notification
|
||||
uses: eikendev/gotify-action@master
|
||||
with:
|
||||
@@ -323,7 +283,6 @@ jobs:
|
||||
gotify_app_token: '${{ secrets.RINOA_RUNNER_GOTIFY_TOKEN }}'
|
||||
notification_title: 'GITEA: README Update'
|
||||
notification_message: 'README updated'
|
||||
|
||||
pr-merge:
|
||||
name: PR Merge
|
||||
needs: [regenerate-readme-modified-services]
|
||||
@@ -331,21 +290,18 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Cache tea CLI
|
||||
id: cache-tea
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: /opt/hostedtoolcache/tea/${{ env.TEA_VERSION }}/x64
|
||||
key: tea-${{ runner.os }}-${{ env.TEA_VERSION }}
|
||||
|
||||
- name: Install tea
|
||||
uses: supplypike/setup-bin@v4
|
||||
with:
|
||||
uri: https://gitea.com/gitea/tea/releases/download/v${{ env.TEA_VERSION }}/tea-${{ env.TEA_VERSION }}-linux-amd64
|
||||
name: tea
|
||||
version: ${{ env.TEA_VERSION }}
|
||||
|
||||
- name: PR Merge
|
||||
id: pr_merge
|
||||
run: |
|
||||
@@ -355,7 +311,6 @@ jobs:
|
||||
pr_index=$(tea pr ls --repo ${{ github.repository }} --state open --fields index,title,head,state --output csv | egrep ${{ github.ref_name }} | awk -F"," '{print $1}' | sed -e 's|"||g')
|
||||
tea pr m --repo ${{ github.repository }} --title "Auto Merge of PR ${pr_index} - ${{ github.ref_name }}" --message "Merged by ${{ github.actor }}" ${pr_index}
|
||||
echo "pr_index=${pr_index}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Gotify Notification
|
||||
uses: eikendev/gotify-action@master
|
||||
with:
|
||||
@@ -363,7 +318,6 @@ jobs:
|
||||
gotify_app_token: '${{ secrets.RINOA_RUNNER_GOTIFY_TOKEN }}'
|
||||
notification_title: 'GITEA: PR Merge Successful'
|
||||
notification_message: 'PR #${{ steps.pr_merge.outputs.pr_index }} merged.'
|
||||
|
||||
docker-compose-deploy:
|
||||
name: Docker Compose Deployment
|
||||
runs-on: ubuntu-latest
|
||||
@@ -379,24 +333,20 @@ jobs:
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: main
|
||||
|
||||
- name: Cache Vault install
|
||||
id: cache-vault
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: /opt/hostedtoolcache/vault/${{ env.HC_VAULT_VERSION }}/x64
|
||||
key: vault-${{ runner.os }}-${{ env.HC_VAULT_VERSION }}
|
||||
|
||||
- name: Install Vault (only if not cached)
|
||||
if: steps.cache-vault.outputs.cache-hit != 'true'
|
||||
uses: cpanato/vault-installer@main
|
||||
with:
|
||||
version: ${{ env.HC_VAULT_VERSION }}
|
||||
|
||||
- name: Login to Gitea Container Registry
|
||||
run: |
|
||||
docker login -u gitea-sonarqube-bot -p ${RINOA_REGISTRY_PASSWORD} git.trez.wtf
|
||||
|
||||
- name: Gotify Notification
|
||||
uses: eikendev/gotify-action@master
|
||||
with:
|
||||
@@ -404,12 +354,10 @@ jobs:
|
||||
gotify_app_token: '${{ secrets.RINOA_RUNNER_GOTIFY_TOKEN }}'
|
||||
notification_title: 'GITEA: Docker Compose Deployment @ Rinoa'
|
||||
notification_message: 'Starting Docker Compose run...'
|
||||
|
||||
- name: Generate .env file for deployment
|
||||
run: |
|
||||
vault kv get -format=json rinoa-docker/env | jq -r '.data.data' | jq -r 'keys[] as $k | "\($k)='\''\(.[$k])'\''"' > .env
|
||||
echo ${DOCKER_SVC_LIST}
|
||||
|
||||
- name: Docker Compose Deployment
|
||||
uses: hoverkraft-tech/compose-action@v2.2.0
|
||||
env:
|
||||
@@ -419,8 +367,6 @@ jobs:
|
||||
${{ needs.generate-service-list.outputs.svc_deploy_list }}
|
||||
up-flags: -d --remove-orphans
|
||||
down-flags: --dry-run
|
||||
compose-flags: --profile rinoa-apps
|
||||
|
||||
- name: Docker Compose Healthcheck
|
||||
uses: jaracogmbh/docker-compose-health-check-action@v1.0.0
|
||||
with:
|
||||
@@ -429,7 +375,6 @@ jobs:
|
||||
compose-file: "docker-compose.yml"
|
||||
skip-exited: "true"
|
||||
skip-no-healthcheck: "true"
|
||||
|
||||
- name: Gotify Notification
|
||||
uses: eikendev/gotify-action@master
|
||||
with:
|
||||
|
||||
@@ -1,13 +1,10 @@
|
||||
name: Auto-Unseal for Vault
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '30 5 * * *'
|
||||
|
||||
env:
|
||||
HC_VAULT_VERSION: '1.20.0'
|
||||
|
||||
jobs:
|
||||
auto-unseal:
|
||||
name: Unseal Vault
|
||||
@@ -25,26 +22,22 @@ jobs:
|
||||
gotify_app_token: '${{ secrets.RINOA_RUNNER_GOTIFY_TOKEN }}'
|
||||
notification_title: 'GITEA: HC Vault @ Rinoa'
|
||||
notification_message: 'Hashicorp Vault unsealing started... 🔐'
|
||||
|
||||
- name: Cache Vault install
|
||||
id: cache-vault
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: /opt/hostedtoolcache/vault/${{ env.HC_VAULT_VERSION }}/x64
|
||||
key: vault-${{ runner.os }}-${{ env.HC_VAULT_VERSION }}
|
||||
|
||||
- name: Install Vault (only if not cached)
|
||||
if: steps.cache-vault.outputs.cache-hit != 'true'
|
||||
uses: cpanato/vault-installer@main
|
||||
with:
|
||||
version: ${{ env.HC_VAULT_VERSION }}
|
||||
|
||||
- name: Unseal Vault
|
||||
run: |
|
||||
for vault_shard in $VAULT_SHARDS; do
|
||||
vault operator unseal -address="${VAULT_ADDR}" -non-interactive "${vault_shard}"
|
||||
done
|
||||
|
||||
- name: Vault Unseal Completion
|
||||
uses: eikendev/gotify-action@master
|
||||
with:
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
| 13ft | ghcr.io/wasi-master/13ft:latest |
|
||||
| actual_server | docker.io/actualbudget/actual-server:latest |
|
||||
| adguard | adguard/adguardhome:latest |
|
||||
| apcupsd-cgi | bnhf/apcupsd-cgi:latest |
|
||||
| apprise-api | lscr.io/linuxserver/apprise-api:latest |
|
||||
| archivebox | archivebox/archivebox:latest |
|
||||
| argus | quay.io/argus-io/argus:latest |
|
||||
@@ -53,11 +52,10 @@
|
||||
| garage | dxflrs/garage:v2.0.0 |
|
||||
| garage-webui | khairul169/garage-webui:latest |
|
||||
| ghost | ghost:latest |
|
||||
| gitea | gitea/gitea:1.24.5 |
|
||||
| gitea | gitea/gitea:1.24.3 |
|
||||
| gitea-db | postgres:14 |
|
||||
| gitea-runner | gitea/act_runner:latest |
|
||||
| gitea-sonarqube-bot | justusbunsi/gitea-sonarqube-bot:v0.4.0 |
|
||||
| gitignore-io | guog/gitignore.io:latest |
|
||||
| gluetun | qmcgaw/gluetun:latest |
|
||||
| gotify | gotify/server |
|
||||
| graylog | graylog/graylog:6.1 |
|
||||
@@ -132,6 +130,10 @@
|
||||
| open-webui-valkey | docker.io/bitnami/valkey:latest |
|
||||
| paperless-ngx | ghcr.io/paperless-ngx/paperless-ngx:latest |
|
||||
| paperless-valkey | docker.io/bitnami/valkey:latest |
|
||||
| patchman-server | ghcr.io/tigattack/patchman |
|
||||
| patchman-worker | ghcr.io/tigattack/patchman |
|
||||
| patchman-memcached | memcached:1.6-alpine |
|
||||
| patchman-valkey | docker.io/bitnami/valkey:latest |
|
||||
| penpot-frontend | penpotapp/frontend:latest |
|
||||
| penpot-backend | penpotapp/backend:latest |
|
||||
| penpot-exporter | penpotapp/exporter:latest |
|
||||
@@ -168,13 +170,13 @@
|
||||
| searxng | searxng/searxng:latest |
|
||||
| searxng-valkey | docker.io/bitnami/valkey:latest |
|
||||
| semaphore-ui | semaphoreui/semaphore:v2.12.14 |
|
||||
| signoz-app | signoz/signoz:v0.92.2 |
|
||||
| signoz-app | signoz/signoz:v0.91.0 |
|
||||
| signoz-clickhouse | clickhouse/clickhouse-server:24.1.2-alpine |
|
||||
| signoz-init-clickhouse | clickhouse/clickhouse-server:24.1.2-alpine |
|
||||
| signoz-logspout | pavanputhra/logspout-signoz |
|
||||
| signoz-otel-collector | signoz/signoz-otel-collector:v0.129.0 |
|
||||
| signoz-schema-migrator-async | signoz/signoz-schema-migrator:v0.129.0 |
|
||||
| signoz-schema-migrator-sync | signoz/signoz-schema-migrator:v0.129.0 |
|
||||
| signoz-otel-collector | signoz/signoz-otel-collector:v0.128.2 |
|
||||
| signoz-schema-migrator-async | signoz/signoz-schema-migrator:v0.128.2 |
|
||||
| signoz-schema-migrator-sync | signoz/signoz-schema-migrator:v0.128.2 |
|
||||
| signoz-zookeeper-1 | bitnami/zookeeper:3.7.1 |
|
||||
| sonarqube | mc1arke/sonarqube-with-community-branch-plugin:lts |
|
||||
| sonarqube-pg-db | postgres:17-alpine |
|
||||
|
||||
@@ -29,7 +29,7 @@ layout:
|
||||
columns: 5
|
||||
Code/DevOps:
|
||||
style: row
|
||||
columns: 3
|
||||
columns: 4
|
||||
Social:
|
||||
style: row
|
||||
columns: 4
|
||||
|
||||
+10
-10
@@ -1,14 +1,14 @@
|
||||
vault_addr: "https://vault.trez.wtf"
|
||||
vault_token: !vault |
|
||||
$ANSIBLE_VAULT;1.2;AES256
|
||||
66306233356534393231373064633939646434316262343431663466653262646431633737343432
|
||||
3364626261356234333233383433316233663866653466390a323733663932316434373038336466
|
||||
36313462356238336638326135363263393863343939313534336134633037643563373837663263
|
||||
3963323538636336360a313564316137333665353565623332623666373066316561323738626336
|
||||
37616537616561336661313763386163643230643731396131373232343038323365626238366430
|
||||
39613835383461393232613730353133343337303838646131353034613966393865346433386133
|
||||
32373161306534396330656531353831356430633038333339326564666464663534363164663130
|
||||
31316665343032396361383534373365613632616436343566323165383166356131636162626339
|
||||
6336
|
||||
$ANSIBLE_VAULT;1.1;AES256
|
||||
31616264333530373062366539333738643937326562616130636266646532653862663966663862
|
||||
6336343130363932316237373939656530663339383061360a626433656432633734363635313236
|
||||
36646161663939393035333066656435663064313031636430386163653438336165663432393563
|
||||
3032316331653662310a653930623965303835396239383663306438633738356563633834623036
|
||||
35616132656166663233613937346364343439306561306661633239623837373564323430386635
|
||||
31663762303234326363643262633761363661656538373333396139376132303564336635623632
|
||||
30303166336432653038333733386334323262623736626435623933653035363035383930366166
|
||||
64376639396664303034656533656339363436306638396462333230636136396538303638323338
|
||||
3138
|
||||
vault_token_cleaned: "{{ vault_token | regex_replace('\\n', '') }}"
|
||||
secrets_path: "rinoa-docker/env"
|
||||
|
||||
+98
-371
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user