feat: add configuration, CI workflow, and Dockerfile updates for Forgejo release sync
Run Forgejo Release Sync / sync (push) Failing after 40s
Run Forgejo Release Sync / sync (push) Failing after 40s
- Introduced `config.toml` to manage repository-specific settings. - Added GitHub Actions workflow for scheduled and manual Forgejo release synchronization. - Updated Dockerfile for Alpine AOT builds, customized Alpine mirrors, and improved dependency management.
This commit is contained in:
1 parent
8db845f27a
commit
d6fd01f642
5 files changed
+97
-15
No files matched your search
@@ -0,0 +1,54 @@
|
||||
name: Run Forgejo Release Sync
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 0 * * *' # daily at 00:00 UTC
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
sync:
|
||||
runs-on: tsv-s1
|
||||
container:
|
||||
image: hub.hamdocker.ir/docker:dind
|
||||
privileged: true
|
||||
|
||||
steps:
|
||||
- name: Switch Alpine to MobinHost mirror
|
||||
run: |
|
||||
ALPINE_VERSION=$(cat /etc/alpine-release | cut -d. -f1,2)
|
||||
echo "https://mirror.mobinhost.com/alpine/v${ALPINE_VERSION}/main" > /etc/apk/repositories
|
||||
echo "https://mirror.mobinhost.com/alpine/v${ALPINE_VERSION}/community" >> /etc/apk/repositories
|
||||
|
||||
- name: Install required tools
|
||||
run: apk add --no-cache git
|
||||
|
||||
- uses: actions/checkout@v7
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v4
|
||||
with:
|
||||
buildkitd-config-inline: |
|
||||
[registry."docker.io"]
|
||||
mirrors = ["https://hub.hamdocker.ir"]
|
||||
|
||||
- name: Build image
|
||||
uses: docker/build-push-action@v7
|
||||
with:
|
||||
context: ForgejoReleaseSync
|
||||
file: ForgejoReleaseSync/Dockerfile
|
||||
push: false
|
||||
load: true
|
||||
tags: forgejo-release-sync:latest
|
||||
|
||||
- name: Run sync
|
||||
run: |
|
||||
docker run --rm \
|
||||
-e FORGEJO_INSTANCE="${{ secrets.FORGEJO_INSTANCE }}" \
|
||||
-e FORGEJO_TOKEN="${{ secrets.FORGEJO_TOKEN }}" \
|
||||
-e SYNC_CONCURRENCY="${{ vars.SYNC_CONCURRENCY || '3' }}" \
|
||||
-e REPO_CONFIG_FILE="/config/config.toml" \
|
||||
-v "${{ github.workspace }}/config.toml:/config/config.toml:ro" \
|
||||
forgejo-release-sync:latest
|
||||
Reference in new issue
Block a user