Re-adding Docker Compose Lint and Gotify notification.
This commit is contained in:
@@ -87,66 +87,66 @@ jobs:
|
||||
run: |
|
||||
yq '.services[].labels.swag_url' docker-compose.yml | egrep -v 'null' | sed -e 's|"||g' | awk -F'.' '{print $1}' | sort -u > compose_subdomains.txt
|
||||
|
||||
# - name: Compare Subdomains
|
||||
# id: compare-subdomains
|
||||
# env:
|
||||
# DOCKER_HOST: tcp://dockerproxy:2375
|
||||
# CF_API_KEY: ${{ secrets.CF_API_TOKEN }}
|
||||
# CF_API_EMAIL: ${{ secrets.CF_API_EMAIL }}
|
||||
# run: |
|
||||
# diff compose_subdomains.txt cloudflare_subdomains.txt | awk '{print $2}' | sed -e 's|.||g' > missing_subdomains.txt
|
||||
# if [ -s missing_subdomains.txt ]; then
|
||||
# echo "Missing subdomains found. Please add them to Cloudflare."
|
||||
# echo "Missing subdomains:"
|
||||
# cat missing_subdomains.txt
|
||||
# exit 1
|
||||
# else
|
||||
# echo "No missing subdomains found."
|
||||
# fi
|
||||
# for subdomain in $(cat missing_subdomains.txt); do
|
||||
# echo "Adding ${subdomain} to Cloudflare..."
|
||||
# flarectl dns creeate --zone ${{ secrets.CF_ZONE_ID }} --type CNAME --name "${subdomain}" --content "trez.wtf" --proxy true
|
||||
# done
|
||||
- name: Compare Subdomains
|
||||
id: compare-subdomains
|
||||
env:
|
||||
DOCKER_HOST: tcp://dockerproxy:2375
|
||||
CF_API_KEY: ${{ secrets.CF_API_TOKEN }}
|
||||
CF_API_EMAIL: ${{ secrets.CF_API_EMAIL }}
|
||||
run: |
|
||||
diff compose_subdomains.txt cloudflare_subdomains.txt | awk '{print $2}' | sed -e 's|.||g' > missing_subdomains.txt
|
||||
if [ -s missing_subdomains.txt ]; then
|
||||
echo "Missing subdomains found. Please add them to Cloudflare."
|
||||
echo "Missing subdomains:"
|
||||
cat missing_subdomains.txt
|
||||
exit 1
|
||||
else
|
||||
echo "No missing subdomains found."
|
||||
fi
|
||||
for subdomain in $(cat missing_subdomains.txt); do
|
||||
echo "Adding ${subdomain} to Cloudflare..."
|
||||
flarectl dns creeate --zone ${{ secrets.CF_ZONE_ID }} --type CNAME --name "${subdomain}" --content "trez.wtf" --proxy true
|
||||
done
|
||||
|
||||
# docker-compose-test:
|
||||
# name: Docker Compose Test
|
||||
# needs: [create-pr]
|
||||
# runs-on: ubuntu-latest
|
||||
# steps:
|
||||
# - name: Checkout
|
||||
# uses: actions/checkout@v4
|
||||
docker-compose-test:
|
||||
name: Docker Compose Test
|
||||
needs: [create-pr]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
# - name: Generate ephemeral .env compose file
|
||||
# id: generate-env-file-pr
|
||||
# run: |
|
||||
# echo "${{ secrets.RINOA_ENV }}" > .env
|
||||
- name: Generate ephemeral .env compose file
|
||||
id: generate-env-file-pr
|
||||
run: |
|
||||
echo "${{ secrets.RINOA_ENV }}" > .env
|
||||
|
||||
# - name: Docker Compose Lint
|
||||
# uses: yu-ichiro/spin-up-docker-compose-action@v1
|
||||
# with:
|
||||
# file: docker-compose.yml
|
||||
# pull: true
|
||||
# pull-opts: --dry-run
|
||||
# up: true
|
||||
# up-opts: --dry-run -d --remove-orphans
|
||||
# env:
|
||||
# DOCKER_HOST: tcp://dockerproxy:2375
|
||||
- name: Docker Compose Lint
|
||||
uses: yu-ichiro/spin-up-docker-compose-action@v1
|
||||
with:
|
||||
file: docker-compose.yml
|
||||
pull: true
|
||||
pull-opts: --dry-run
|
||||
up: true
|
||||
up-opts: --dry-run -d --remove-orphans
|
||||
env:
|
||||
DOCKER_HOST: tcp://dockerproxy:2375
|
||||
|
||||
# merge-pr:
|
||||
# name: PR Merge
|
||||
# runs-on: ubuntu-latest
|
||||
# needs: [docker-compose-test]
|
||||
# steps:
|
||||
# - name: Checkout
|
||||
# uses: actions/checkout@v4
|
||||
merge-pr:
|
||||
name: PR Merge
|
||||
runs-on: ubuntu-latest
|
||||
needs: [docker-compose-test]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
# - name: Send Gotify Notification
|
||||
# uses: eikendev/gotify-action@0.0.3
|
||||
# with:
|
||||
# gotify_api_base: '${{ secrets.GOTIFY_URL }}'
|
||||
# gotify_app_token: '${{ secrets.GOTIFY_TOKEN }}'
|
||||
# notification_title: '${{ github.ref_name }} ready to be merged.'
|
||||
# notification_message: '${{ gitea.server_url }}/issues'
|
||||
- name: Send Gotify Notification
|
||||
uses: eikendev/gotify-action@0.0.3
|
||||
with:
|
||||
gotify_api_base: '${{ secrets.GOTIFY_URL }}'
|
||||
gotify_app_token: '${{ secrets.GOTIFY_TOKEN }}'
|
||||
notification_title: '${{ github.ref_name }} ready to be merged.'
|
||||
notification_message: '${{ gitea.server_url }}/issues'
|
||||
|
||||
# - name: Manual Approval
|
||||
# uses: trstringer/manual-approval@v1
|
||||
|
||||
Reference in New Issue
Block a user