This repository has been archived by the owner on Aug 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #30 from jumpserver/dev
feat: 同步 gitea
- Loading branch information
Showing
4 changed files
with
67 additions
and
7 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -69,4 +69,20 @@ jobs: | |
run: | | ||
gh release create ${{ steps.get-version.outputs.version }} --notes "Release ${{ steps.get-version.outputs.version }}" || echo "Release already exists" | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Setup Gitea Private Key | ||
uses: webfactory/[email protected] | ||
with: | ||
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} | ||
|
||
- name: Sync to Gitea Repository | ||
run: | | ||
ssh -o StrictHostKeyChecking=no [email protected] || echo "" | ||
rm -rf .git | ||
git clone --depth=1 git@${{ github.repository }}.git | ||
mv opt/* web-static/ | ||
git add . | ||
git commit -m "Release Version ${{ steps.get-version.outputs.version }}" | ||
git tag -a ${{ steps.get-version.outputs.version }} -m "Release Version ${{ steps.get-version.outputs.version }}" | ||
git push origin ${{ steps.get-version.outputs.version }} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Sync Gitea Repository | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: 'Build Version' | ||
required: true | ||
default: 'v1.1.1' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Prepare files | ||
run: | | ||
bash prepare.sh | ||
- name: Setup Gitea Private Key | ||
uses: webfactory/[email protected] | ||
with: | ||
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} | ||
|
||
- name: Sync to Gitea Repository | ||
run: | | ||
ssh -o StrictHostKeyChecking=no [email protected] || echo "" | ||
rm -rf .git | ||
git clone --depth=1 git@${{ github.repository }}.git web-static | ||
mv opt/* web-static/ | ||
git add . | ||
git commit -m "Release Version ${{ github.event.inputs.version }}" | ||
git tag -a ${{ github.event.inputs.version }} -m "Release Version ${{ github.event.inputs.version }}" | ||
git push origin ${{ github.event.inputs.version }} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
v1.1.0 | ||
v1.1.1 |