Testing out Cloudflare export.
This commit is contained in:
@@ -32,44 +32,65 @@ jobs:
|
|||||||
token: ${{ secrets.BOT_GITEA_TOKEN }}
|
token: ${{ secrets.BOT_GITEA_TOKEN }}
|
||||||
assignee: ${{ gitea.actor }}
|
assignee: ${{ gitea.actor }}
|
||||||
|
|
||||||
docker-compose-test:
|
cloudflare-dns-setup:
|
||||||
name: Docker Compose Test
|
name: Cloudflare DNS Setup
|
||||||
needs: [create-pr]
|
needs: [check-and-create-pr]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Generate ephemeral .env compose file
|
- name: Cloudflare DNS Export
|
||||||
id: generate-env-file-pr
|
uses: raiyansarker/cloudflare-dns-export@v1.1
|
||||||
run: |
|
|
||||||
echo "${{ secrets.RINOA_ENV }}" > .env
|
|
||||||
|
|
||||||
- name: Docker Compose Lint
|
|
||||||
uses: yu-ichiro/spin-up-docker-compose-action@v1
|
|
||||||
with:
|
with:
|
||||||
file: docker-compose.yml
|
NAME: ${{ github.repository }}
|
||||||
pull: true
|
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
||||||
pull-opts: --dry-run
|
ZONE_ID: ${{secrets.CF_ZONE_ID}}
|
||||||
up: true
|
API_KEY: ${{secrets.CF_API_KEY}}
|
||||||
up-opts: --dry-run -d --remove-orphans
|
PREFIX: trez.wtf
|
||||||
env:
|
|
||||||
DOCKER_HOST: tcp://dockerproxy:2375
|
|
||||||
|
|
||||||
merge-pr:
|
- name: Parse Cloudflare DNS Export
|
||||||
name: PR Merge
|
id: parse-cloudflare-dns-export
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: [docker-compose-test]
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Tea CLI Setup & PR Merge
|
|
||||||
run: |
|
run: |
|
||||||
curl -sSL https://dl.gitea.com/tea/main/tea-main-linux-amd64 -o /usr/local/bin/tea
|
echo "::set-output name=dns_records::$(cat trez.wtf.json | jq -c '.[]')"
|
||||||
chmod +x /usr/local/bin/tea
|
# docker-compose-test:
|
||||||
echo "Merging PR..."
|
# name: Docker Compose Test
|
||||||
tea login add --name gitea-rinoa --url ${{ vars.RINOA_GITEA_URL }} --user gitea-sonarqube-bot --password "${{ secrets.BOT_GITEA_PASSWORD }}" --token ${{ secrets.BOT_GITEA_TOKEN }}
|
# needs: [create-pr]
|
||||||
echo ${{ gitea.ref_name }}
|
# runs-on: ubuntu-latest
|
||||||
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')
|
# steps:
|
||||||
tea pr m --repo ${{ github.repository }} --title "Auto Merge" --message "Merged by ${{ gitea.actor }}" --output table ${pr_index}
|
# - name: Checkout
|
||||||
|
# uses: actions/checkout@v4
|
||||||
|
|
||||||
|
# - 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
|
||||||
|
|
||||||
|
# merge-pr:
|
||||||
|
# name: PR Merge
|
||||||
|
# runs-on: ubuntu-latest
|
||||||
|
# needs: [docker-compose-test]
|
||||||
|
# steps:
|
||||||
|
# - name: Checkout
|
||||||
|
# uses: actions/checkout@v4
|
||||||
|
|
||||||
|
# - name: Tea CLI Setup & PR Merge
|
||||||
|
# run: |
|
||||||
|
# curl -sSL https://dl.gitea.com/tea/main/tea-main-linux-amd64 -o /usr/local/bin/tea
|
||||||
|
# chmod +x /usr/local/bin/tea
|
||||||
|
# echo "Merging PR..."
|
||||||
|
# tea login add --name gitea-rinoa --url ${{ vars.RINOA_GITEA_URL }} --user gitea-sonarqube-bot --password "${{ secrets.BOT_GITEA_PASSWORD }}" --token ${{ secrets.BOT_GITEA_TOKEN }}
|
||||||
|
# echo ${{ gitea.ref_name }}
|
||||||
|
# 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" --message "Merged by ${{ gitea.actor }}" --output table ${pr_index}
|
||||||
Reference in New Issue
Block a user