-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
File Sync from linuxdeepin/.github (#32)
chore: Sync by linuxdeepin/.github@14d6085
- Loading branch information
1 parent
4e89237
commit f38fbcc
Showing
5 changed files
with
114 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: backup to gitlab | ||
on: [push] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
backup-to-gitlab: | ||
if: github.repository_owner == 'linuxdeepin' | ||
name: backup-to-gitlab | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
repository: "linuxdeepin/jenkins-bridge-client" | ||
path: jenkins-bridge-client | ||
|
||
- name: Install Client | ||
run: | | ||
cd $GITHUB_WORKSPACE/jenkins-bridge-client | ||
go build . | ||
sudo install -Dvm755 jenkins-bridge-client -t /usr/bin/ | ||
- name: Trigger sync | ||
id: generate-runid | ||
run: | | ||
echo "::set-output name=RUN_ID::$(jenkins-bridge-client -triggerSync -token '${{ secrets.BRIDGETOKEN }}')" | ||
- name: Print log | ||
run: | | ||
jenkins-bridge-client -printlog -token "${{ secrets.BRIDGETOKEN }}" -runid "${{ steps.generate-runid.outputs.RUN_ID }}" | ||
backup-to-gitee: | ||
if: github.repository_owner == 'linuxdeepin' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: create-repo | ||
run: | | ||
repo=${{ github.event.repository.name }} | ||
homepage="https://github.com/linuxdeepin/${repo}" | ||
description="mirror of ${homepage}" | ||
# remove '.' prefix | ||
repo=${repo#"."} | ||
curl -X POST --header 'Content-Type: application/json;charset=UTF-8' 'https://gitee.com/api/v5/enterprises/linuxdeepin/repos' -d '{"private": 1,"access_token":"${{ secrets.GITEE_SYNC_TOKEN }}","name":"'"$repo"'","description":"'"$description"'","homepage":"'"$homepage"'","has_issues":"false","has_wiki":"false","can_comment":"false"}' || true | ||
- name: push | ||
run: | | ||
git clone --bare https://github.com/linuxdeepin/${{ github.event.repository.name }}.git .git | ||
repo=${{ github.event.repository.name }} | ||
# remove '.' prefix | ||
repo=${repo#"."} | ||
git remote set-url origin https://myml:${{ secrets.GITEE_SYNC_TOKEN }}@gitee.com/linuxdeepin/${repo}.git | ||
git push -f --all --prune origin | ||
git push --tags origin |
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,15 @@ | ||
name: Call build-deb | ||
on: | ||
pull_request_target: | ||
paths-ignore: | ||
- ".github/workflows/**" | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-pull/${{ github.event.number }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
check_job: | ||
uses: linuxdeepin/.github/.github/workflows/build-deb.yml@master | ||
secrets: | ||
BridgeToken: ${{ secrets.BridgeToken }} |
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,10 @@ | ||
name: chatOps | ||
on: | ||
issue_comment: | ||
types: [created] | ||
|
||
jobs: | ||
chatopt: | ||
uses: linuxdeepin/.github/.github/workflows/chatOps.yml@master | ||
secrets: | ||
APP_PRIVATE_KEY: ${{ secrets.APP_PRIVATE_KEY }} |
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,11 @@ | ||
name: Call commitlint | ||
on: | ||
pull_request_target: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-pull/${{ github.event.number }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
check_job: | ||
uses: linuxdeepin/.github/.github/workflows/commitlint.yml@master |
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,26 @@ | ||
name: cppcheck | ||
on: | ||
pull_request_target: | ||
paths-ignore: | ||
- ".github/workflows/**" | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-pull/${{ github.event.number }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
cppchceck: | ||
name: cppcheck | ||
runs-on: ubuntu-latest | ||
steps: | ||
- run: export | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
persist-credentials: false | ||
- uses: linuxdeepin/action-cppcheck@main | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
repository: ${{ github.repository }} | ||
pull_request_id: ${{ github.event.pull_request.number }} | ||
allow_approve: false |