Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

workflows: Add github action workflows to check pull requests. #121

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .github/workflows/backup-to-gitlab.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: backup to gitlab
on: [push]

concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true

jobs:
backup-to-gitlabwh:
uses: deepin-community/.github/.github/workflows/backup-to-gitlabwh.yml@master
secrets:
BRIDGETOKEN: ${{ secrets.BRIDGETOKEN }}
31 changes: 31 additions & 0 deletions .github/workflows/backup-to-gitlabwh.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: backup to gitlab
workflow_call:
secrets:
BRIDGETOKEN:
required: true

jobs:
backup-to-gitlab:
if: github.repository_owner == 'deepin-community'
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 }}"
Loading