feat(action): add GitHub-Gitea release sync workflow
- Introduces a composite action to synchronize releases from Gitea to GitHub - Adds support for configurable inputs like repository details and tokens - Implements steps for fetching and pushing releases via scripts
This commit is contained in:
55
action.yml
Normal file
55
action.yml
Normal file
@@ -0,0 +1,55 @@
|
||||
name: "Releases Sync Action"
|
||||
description: "Synchronizes releases from Gitea to GitHub"
|
||||
|
||||
inputs:
|
||||
gitea_token:
|
||||
description: "Gitea API Token"
|
||||
required: false
|
||||
gitea_url:
|
||||
description: "Base URL of the Gitea instance"
|
||||
required: false
|
||||
gitea_owner:
|
||||
description: "Owner of the Gitea repository"
|
||||
required: false
|
||||
gitea_repo:
|
||||
description: "Gitea repository name"
|
||||
required: false
|
||||
|
||||
tag_name:
|
||||
description: "The tag name of the release to be synchronized"
|
||||
required: true
|
||||
|
||||
github_owner:
|
||||
description: "Owner or organization of the GitHub repository"
|
||||
required: true
|
||||
github_repo:
|
||||
description: "GitHub repository name"
|
||||
required: true
|
||||
github_token:
|
||||
description: "GitHub token to push releases"
|
||||
required: true
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Fetch release from Gitea
|
||||
shell: bash
|
||||
run: |
|
||||
./scripts/fetch-gitea-release.sh
|
||||
env:
|
||||
GITEA_TOKEN: ${{ inputs.gitea_token }}
|
||||
GITEA_URL: ${{ inputs.gitea_url }}
|
||||
GITEA_OWNER: ${{ inputs.gitea_owner }}
|
||||
GITEA_REPO: ${{ inputs.gitea_repo }}
|
||||
TAG: ${{ inputs.tag_name }}
|
||||
|
||||
- name: Push release to GitHub
|
||||
shell: bash
|
||||
run: |
|
||||
TAG_NAME=${{ inputs.tag_name }}
|
||||
export TAG="$TAG_NAME"
|
||||
export WORKDIR="$GT_RSA_RELEASE_DIR"
|
||||
export GITHUB_OWNER="${{ inputs.github_owner }}"
|
||||
export GITHUB_REPO="${{ inputs.github_repo }}"
|
||||
export GITHUB_TOKEN="${{ inputs.github_token }}"
|
||||
./scripts/upsert-github-release.sh
|
Reference in New Issue
Block a user