From 2be725aa9404460c2f09f08e47d71c21553b4196 Mon Sep 17 00:00:00 2001 From: Rodrigo de Avila Date: Wed, 9 Aug 2023 19:51:23 -0300 Subject: [PATCH] Create main.yml --- .github/workflows/main.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..5f1c123 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,28 @@ +name: Create Report + +on: + schedule: + - cron: '30 * * * *' + +jobs: + create_report: + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v3 + - name: Calculate mirror drift + run: | + apt install jq pandoc python3-pip curl + pip install yq + mkdir dist + bash run.sh > dist/result.md + cd dist + pandoc -f markdown -t html result.md > index.html + rm result.md + - name: Publish to Cloudflare Pages + uses: cloudflare/pages-action@v1 + with: + apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} + accountId: b3e2c8cc31d84afe192b6a5353c2f7ef + projectName: almalinux-mirrors-report + directory: dist + branch: main