From 75100d0d0e8707329c13e6e0ffc6ec74fe8b6a20 Mon Sep 17 00:00:00 2001 From: Siu Jam Oh Date: Mon, 20 Jul 2026 11:40:44 +0800 Subject: [PATCH] Add .gitea/workflows/update-install-script.yaml --- .gitea/workflows/update-install-script.yaml | 43 +++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .gitea/workflows/update-install-script.yaml diff --git a/.gitea/workflows/update-install-script.yaml b/.gitea/workflows/update-install-script.yaml new file mode 100644 index 0000000..3304bfb --- /dev/null +++ b/.gitea/workflows/update-install-script.yaml @@ -0,0 +1,43 @@ +name: Synchronise Upstream Script + +on: + schedule: + # Runs at 02:00 GMT every Thursday (4 represents Thursday) + - cron: '0 2 * * 4' + workflow_dispatch: # Allows manual triggering to test the workflow behaviour + +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.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." + else + 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