@@ -25,15 +25,13 @@ jobs:
|
|||||||
id: list-prs
|
id: list-prs
|
||||||
run: |
|
run: |
|
||||||
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 }}
|
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 }}
|
||||||
which tea
|
tea login default gitea-rinoa
|
||||||
echo "List all PRs"
|
echo "Checking if PR exists for ${{ github.ref_name }}"
|
||||||
tea pr ls --repo ${{ github.repository }} --state all
|
pr_state=$(tea pr ls --repo ${{ github.repository }} --state open --fields index,title,head,state --output csv | egrep ${{ gitea.ref_name }} | awk -F, '{print $4}' | sed -e 's|"||g')
|
||||||
echo "Check if PR exists for ${{ github.ref_name }}"
|
if [ "${pr_state}" != 'open' ]; then
|
||||||
pr_state=$(tea pr ls --repo ${{ github.repository }} --state all --fields index,title,head,state --output csv | egrep ${{ gitea.ref_name }} | awk -F, '{print $4}' | sed -e 's|"||g')
|
echo "PR does not exist, creating..."
|
||||||
echo "PR_STATE: ${pr_state}"
|
tea pr c -r "${{ github.repository }}" -t "Automated PR for ${{ github.ref_name }}" -d "Automated PR for ${{ github.ref_name }}"
|
||||||
if [ ${pr_state} != open ]; then
|
elif [ "${pr_state}" = 'open' ]; then
|
||||||
tea pr c -r ${{ github.repository }} -t "Automated PR for ${{ github.ref_name }}" -d "Automated PR for ${{ github.ref_name }}"
|
|
||||||
elif [ ${pr_state} = open ]; then
|
|
||||||
echo "PR already exists, skipping creation..."
|
echo "PR already exists, skipping creation..."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -43,7 +41,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
env:
|
env:
|
||||||
VAULT_ADDR: ${{ secrets.RINOA_VAULT_ADDR }}
|
VAULT_ADDR: ${{ secrets.RINOA_VAULT_ADDR }}
|
||||||
VAULT_TOKEN: ${{ secrets.RINOA_VAULT_TOKEN }}
|
VAULT_TOKEN: ${{ secrets.VAULT_GITEA_TOKEN }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -58,7 +56,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Generate .env file for linting
|
- name: Generate .env file for linting
|
||||||
run: |
|
run: |
|
||||||
vault kv get -format=json rinoa-docker/env | jq -r '.data.data' | jq -r 'keys[] as $k | "\($k)='\''\(.[$k])'\''"' > .env
|
vault kv get -format=json rinoa-docker/env | jq -r '.data.data' | jq -r 'keys[] as $k | "\($k)='\''\(.[$k])'\''"' > .env
|
||||||
|
|
||||||
- name: Docker Compose Lint
|
- name: Docker Compose Lint
|
||||||
uses: yu-ichiro/spin-up-docker-compose-action@v1
|
uses: yu-ichiro/spin-up-docker-compose-action@v1
|
||||||
@@ -129,6 +127,8 @@ jobs:
|
|||||||
name: Update README
|
name: Update README
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [cloudflare-dns-setup]
|
needs: [cloudflare-dns-setup]
|
||||||
|
outputs:
|
||||||
|
pr-pushed: ${{ steps.commit-readme.outputs.pushed }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -147,17 +147,26 @@ jobs:
|
|||||||
file: ./services.yml
|
file: ./services.yml
|
||||||
|
|
||||||
- name: Regenerate README
|
- name: Regenerate README
|
||||||
uses: gnpaone/dynamic-update-readme@v1.0.2
|
run: |
|
||||||
with:
|
echo "# List of Services" > README.md
|
||||||
marker_text: "SERVICES_LIST"
|
echo -e "\n\n" >> README.md
|
||||||
markdown_text: |
|
echo "${{ steps.service-table.outputs.table }}" >> README.md
|
||||||
${{ steps.service-table.outputs.table }}
|
|
||||||
|
|
||||||
deployment-trigger:
|
- name: Add/Commit README.md
|
||||||
name: Deployment Trigger
|
id: commit-readme
|
||||||
needs: [generate-readme, docker-compose-test, regenerate-readme]
|
uses: EndBug/add-and-commit@v9
|
||||||
|
with:
|
||||||
|
message: "chore: Update README"
|
||||||
|
add: "README.md"
|
||||||
|
|
||||||
|
pr-merge:
|
||||||
|
name: PR Merge
|
||||||
|
needs: [regenerate-readme]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install tea
|
- name: Install tea
|
||||||
uses: supplypike/setup-bin@v4
|
uses: supplypike/setup-bin@v4
|
||||||
with:
|
with:
|
||||||
@@ -166,57 +175,45 @@ jobs:
|
|||||||
version: '0.9.2'
|
version: '0.9.2'
|
||||||
|
|
||||||
- name: PR Merge
|
- name: PR Merge
|
||||||
|
id: pr_merge
|
||||||
run: |
|
run: |
|
||||||
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 }}
|
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 }}
|
||||||
tea pr ls --repo ${{ github.repository }} --state all
|
tea login default gitea-rinoa
|
||||||
pr_index=$(tea pr ls --repo ${{ github.repository }} --state open --fields index,title,head,state --output csv | egrep ${{ gitea.ref_name }} | awk -F, '{print $1}' | sed -e 's|"||g')
|
pr_index=$(tea pr ls --repo ${{ github.repository }} --state open --fields index,title,head,state --output csv | egrep ${{ gitea.ref_name }} | awk -F, '{print $1}' | sed -e 's|"||g')
|
||||||
tea pr m --repo ${{ github.repository }} --title "Auto Merge of PR #${pr_index} - ${{ gitea.ref_name }}" --message "Merged by ${{ gitea.actor }}" --output table ${pr_index}
|
tea pr m --repo ${{ github.repository }} --title "Auto Merge of PR #${pr_index} - ${{ gitea.ref_name }}" --message "Merged by ${{ gitea.actor }}" --output table ${pr_index}
|
||||||
echo "PR_INDEX=${pr_index}" >> $GITHUB_OUPUT
|
echo "pr_index=${pr_index}" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Gotify Notification
|
- name: Wait for PR to be merged
|
||||||
uses: eikendev/gotify-action@master
|
run: |
|
||||||
|
while true; do
|
||||||
|
pr_state=$(tea pr ls --repo ${{ github.repository }} --state merged --fields index,title,head,state --output csv | egrep ${{ github.ref_name }} | awk -F, '{print $4}' | sed -e 's|"||g')
|
||||||
|
if [ "${pr_state}" == "merged" ]; then
|
||||||
|
break
|
||||||
|
|
||||||
|
docker-compose-deploy:
|
||||||
|
name: Deploy via Docker Compose
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: [pr-merge]
|
||||||
|
env:
|
||||||
|
VAULT_ADDR: ${{ secrets.RINOA_VAULT_ADDR }}
|
||||||
|
VAULT_TOKEN: ${{ secrets.VAULT_GITEA_TOKEN }}
|
||||||
|
DOCKER_HOST: tcp://dockerproxy:2375
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
gotify_api_base: '${{ secrets.RINOA_GOTIFY_URL }}'
|
ref: main
|
||||||
gotify_app_token: '${{ secrets.RINOA_GOTIFY_TOKEN }}'
|
|
||||||
notification_title: 'Ready to Deploy'
|
|
||||||
notification_message: 'Ready to deploy: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/jobs/${{ github.job }}'
|
|
||||||
|
|
||||||
- name: Trigger Deployment
|
- name: Install Vault
|
||||||
id: deploy-trigger
|
uses: cpanato/vault-installer@main
|
||||||
uses: macnev2013/manual-approval@v1.0.18
|
|
||||||
with:
|
|
||||||
secret: ${{ github.TOKEN }}
|
|
||||||
approvers: Trez.One
|
|
||||||
minimum-approvals: 1
|
|
||||||
approval-wait: 600
|
|
||||||
issue-title: 'Manual Approval for #${pr_index} - ${{ gitea.ref_name }}'
|
|
||||||
issue-body: |
|
|
||||||
"Autobots, roll out!"
|
|
||||||
|
|
||||||
# docker-compose-deploy:
|
- name: Generate .env file for deployment
|
||||||
# name: Merge and Deploy
|
run: |
|
||||||
# runs-on: ubuntu-latest
|
vault kv get -format=json rinoa-docker/env | jq -r '.data.data' | jq -r 'keys[] as $k | "\($k)='\''\(.[$k])'\''"' > .env
|
||||||
# needs: [deployment-trigger]
|
|
||||||
# env:
|
|
||||||
# VAULT_ADDR: ${{ secrets.RINOA_VAULT_ADDR }}
|
|
||||||
# VAULT_TOKEN: ${{ secrets.RINOA_VAULT_TOKEN }}
|
|
||||||
# steps:
|
|
||||||
# - name: Checkout
|
|
||||||
# uses: actions/checkout@v4
|
|
||||||
# with:
|
|
||||||
# ref: main
|
|
||||||
|
|
||||||
# - name: Install Vault
|
|
||||||
# uses: cpanato/vault-installer@main
|
|
||||||
|
|
||||||
# - name: Generate .env file for deployment
|
- name: Docker Compose Deployment
|
||||||
# run: |
|
uses: Autom3/docker-deployment-action@3.0.1
|
||||||
# vault kv get -format=json rinoa-docker/env | jq -r '.data.data' | jq -r 'keys[] as $k | "\($k)='\''\(.[$k])'\''"' > .env
|
with:
|
||||||
|
remote_docker_host: gitea-deploy@192.168.1.254
|
||||||
# - name: Docker Compose Deployment
|
ssh_private_key: ${{ secrets.RINOA_GITEA_PRIVATE_SSH_KEY }}
|
||||||
# uses: Autom3/docker-deployment-action@3.0.1
|
ssh_public_key: ${{ secrets.RINOA_GITEA_PUBLIC_SSH_KEY }}
|
||||||
# with:
|
|
||||||
# remote_docker_host: gitea-deploy@192.168.1.254
|
|
||||||
# ssh_private_key: ${{ secrets.RINOA_GITEA_PRIVATE_SSH_KEY }}
|
|
||||||
# ssh_public_key: ${{ secrets.RINOA_GITEA_PUBLIC_SSH_KEY }}
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
# List of Services
|
# List of Services
|
||||||
|
|
||||||
`~> yq '.services | to_entries | map({service: .key, image: .value.image})' docker-compose.yml`
|
|
||||||
|
|
||||||
<!-- SERVICES_LIST_START -->
|
|
||||||
| Service | Image |
|
| Service | Image |
|
||||||
| --- | --- |
|
| --- | --- |
|
||||||
| actual_server | docker.io/actualbudget/actual-server:latest |
|
| actual_server | docker.io/actualbudget/actual-server:latest |
|
||||||
@@ -60,12 +59,12 @@
|
|||||||
| it-tools | ghcr.io/corentinth/it-tools:latest |
|
| it-tools | ghcr.io/corentinth/it-tools:latest |
|
||||||
| jellyfin | jellyfin/jellyfin |
|
| jellyfin | jellyfin/jellyfin |
|
||||||
| jitsi-etherpad | etherpad/etherpad:1.8.6 |
|
| jitsi-etherpad | etherpad/etherpad:1.8.6 |
|
||||||
| jitsi-jibri | jitsi/jibri:${JITSI_IMAGE_VERSION:-stable} |
|
| jitsi-jibri | jitsi/jibri:stable |
|
||||||
| jitsi-jicofo | jitsi/jicofo:${JITSI_IMAGE_VERSION:-stable} |
|
| jitsi-jicofo | jitsi/jicofo:stable |
|
||||||
| jitsi-jigasi | jitsi/jigasi:${JITSI_IMAGE_VERSION:-stable} |
|
| jitsi-jigasi | jitsi/jigasi:stable |
|
||||||
| jitsi-jvb | jitsi/jvb:${JITSI_IMAGE_VERSION:-stable} |
|
| jitsi-jvb | jitsi/jvb:stable |
|
||||||
| jitsi-prosody | jitsi/prosody:${JITSI_IMAGE_VERSION:-stable} |
|
| jitsi-prosody | jitsi/prosody:stable |
|
||||||
| jitsi-web | jitsi/web:${JITSI_IMAGE_VERSION:-stable} |
|
| jitsi-web | jitsi/web:stable |
|
||||||
| joplin-db | postgres:17-alpine |
|
| joplin-db | postgres:17-alpine |
|
||||||
| joplin | joplin/server:latest |
|
| joplin | joplin/server:latest |
|
||||||
| komodo-core | ghcr.io/mbecker20/komodo:latest |
|
| komodo-core | ghcr.io/mbecker20/komodo:latest |
|
||||||
@@ -136,25 +135,23 @@
|
|||||||
| wallos | bellamy/wallos:latest |
|
| wallos | bellamy/wallos:latest |
|
||||||
| watchtower | ghcr.io/containrrr/watchtower:latest |
|
| watchtower | ghcr.io/containrrr/watchtower:latest |
|
||||||
| wazuh.agent | opennix/wazuh-agent:latest |
|
| wazuh.agent | opennix/wazuh-agent:latest |
|
||||||
| wazuh.dashboard | wazuh/wazuh-dashboard:${WAZUH_VERSION} |
|
| wazuh.dashboard | wazuh/wazuh-dashboard: |
|
||||||
| wazuh.indexer | wazuh/wazuh-indexer:${WAZUH_VERSION} |
|
| wazuh.indexer | wazuh/wazuh-indexer: |
|
||||||
| wazuh.manager | wazuh/wazuh-manager:${WAZUH_VERSION} |
|
| wazuh.manager | wazuh/wazuh-manager: |
|
||||||
| web-check | lissy93/web-check |
|
| web-check | lissy93/web-check |
|
||||||
| whodb | clidey/whodb |
|
| whodb | clidey/whodb |
|
||||||
| your_spotify | lscr.io/linuxserver/your_spotify:latest |
|
| your_spotify | lscr.io/linuxserver/your_spotify:latest |
|
||||||
| youtubedl | nbr23/youtube-dl-server:latest |
|
| youtubedl | nbr23/youtube-dl-server:latest |
|
||||||
| zammad-backup | postgres:${ZAMMAD_POSTGRES_VERSION} |
|
| zammad-backup | postgres: |
|
||||||
| zammad-elasticsearch | bitnami/elasticsearch:${ZAMMAD_ELASTICSEARCH_VERSION} |
|
| zammad-elasticsearch | bitnami/elasticsearch: |
|
||||||
| zammad-init | ${ZAMMAD_IMAGE_REPO}:${ZAMMAD_VERSION} |
|
| zammad-init | : |
|
||||||
| zammad-memcached | memcached:${ZAMMAD_MEMCACHE_VERSION} |
|
| zammad-memcached | memcached: |
|
||||||
| zammad-nginx | ${ZAMMAD_IMAGE_REPO}:${ZAMMAD_VERSION} |
|
| zammad-nginx | : |
|
||||||
| zammad-postgresql | postgres:${ZAMMAD_POSTGRES_VERSION} |
|
| zammad-postgresql | postgres: |
|
||||||
| zammad-railsserver | ${ZAMMAD_IMAGE_REPO}:${ZAMMAD_VERSION} |
|
| zammad-railsserver | : |
|
||||||
| zammad-redis | redis:${ZAMMAD_REDIS_VERSION} |
|
| zammad-redis | redis: |
|
||||||
| zammad-scheduler | ${ZAMMAD_IMAGE_REPO}:${ZAMMAD_VERSION} |
|
| zammad-scheduler | : |
|
||||||
| zammad-websocket | ${ZAMMAD_IMAGE_REPO}:${ZAMMAD_VERSION} |
|
| zammad-websocket | : |
|
||||||
| zitadel | ghcr.io/zitadel/zitadel:latest |
|
| zitadel | ghcr.io/zitadel/zitadel:latest |
|
||||||
| zitadel-pg-db | postgres:16-alpine |
|
| zitadel-pg-db | postgres:16-alpine |
|
||||||
|
|
||||||
|
|
||||||
<!-- SERVICES_LIST_END -->
|
|
||||||
Reference in New Issue
Block a user