From 088c53036120d275c8c9da207815408de4529cfa Mon Sep 17 00:00:00 2001 From: siujamo Date: Fri, 4 Sep 2026 11:43:47 +0800 Subject: [PATCH] chore: migrate CI to GitHub Actions --- .../workflows/update-install-script.yml | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) rename .gitea/workflows/update-install-script.yaml => .github/workflows/update-install-script.yml (80%) diff --git a/.gitea/workflows/update-install-script.yaml b/.github/workflows/update-install-script.yml similarity index 80% rename from .gitea/workflows/update-install-script.yaml rename to .github/workflows/update-install-script.yml index 3304bfb..50e082b 100644 --- a/.gitea/workflows/update-install-script.yaml +++ b/.github/workflows/update-install-script.yml @@ -2,37 +2,38 @@ name: Synchronise Upstream Script on: schedule: - # Runs at 02:00 GMT every Thursday (4 represents Thursday) + # Runs at 02:00 UTC every Thursday (4 represents Thursday) - cron: '0 2 * * 4' workflow_dispatch: # Allows manual triggering to test the workflow behaviour +# Grant the built-in GITHUB_TOKEN permission to push the synced script +permissions: + contents: write + jobs: update-script: runs-on: ubuntu-latest steps: - name: Checkout repository uses: actions/checkout@v4 - with: - # Ensure we have the necessary credentials to push changes - token: ${{ secrets.GITHUB_TOKEN }} - name: Download the latest script run: | # Fetch the latest installation script from Docker curl -fsSL https://get.docker.com -o get-docker.sh - + # Ensure the file is executable chmod +x get-docker.sh - name: Check for changes and commit run: | # Configure Git identity for the automated commit - git config user.name "gitea-actions-bot" + git config user.name "onixbyte" git config user.email "actions@onixbyte.dev" - + # Add the script to the staging area git add get-docker.sh - + # Determine if any modifications have occurred if git diff --staged --quiet; then echo "No modifications detected. The script is currently up to date." @@ -40,4 +41,4 @@ jobs: git commit -m "chore: synchronise get-docker.sh with upstream" git push echo "Modifications committed and pushed successfully." - fi \ No newline at end of file + fi