This repository was archived by the owner on Apr 17, 2025. It is now read-only.
Hosting Report - Generate and Sync #14
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # SPDX-License-Identifier: GPL-2.0-or-later | |
| # Copyright (C) 2025 SteamFork | |
| name: Hosting Report - Generate and Sync | |
| permissions: | |
| contents: write | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '30 0 * * *' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| generate-and-sync: | |
| if: github.repository == 'SteamFork/distribution' # Ensure the workflow runs only for this repository | |
| timeout-minutes: 1440 | |
| runs-on: 3.7 | |
| steps: | |
| - name: Set up Git | |
| env: | |
| BRANCH_NAME: 3.7 | |
| run: | | |
| if [ ! -d ".git" ]; then | |
| git init | |
| git remote add origin https://github.com/${{ github.repository }}.git | |
| fi | |
| git fetch origin "${BRANCH_NAME}" | |
| git checkout -B "${BRANCH_NAME}" origin/"${BRANCH_NAME}" | |
| - name: Generate Hosting Report | |
| run: | | |
| set -e | |
| make hosting-report | |
| - name: Sync Hosting Report to Primary Instance | |
| run: | | |
| set -e | |
| make hosting-report-sync | |
| - name: Mirror Hosting Report to All Instances | |
| run: | | |
| set -e | |
| make mirrors-sync |