From 1f496b8bacd61fe90f5aad2dfe711b8876b3ff31 Mon Sep 17 00:00:00 2001 From: Tedd Ho-Jeong An Date: Wed, 4 Nov 2020 21:09:48 -0800 Subject: [PATCH] workflow: Add workflow files for ci This patch adds workflow files for ci: [schedule_work.yml] - The workflow file for scheduled work - Sync the repo with upstream repo and rebase the workflow branch - Review the patches in the patchwork and creates the PR if needed [ci.yml] - The workflow file for CI tasks - Run CI tests when PR is created Signed-off-by: Tedd Ho-Jeong An --- .github/workflows/ci.yml | 40 +++++++++++++++++++++++++++++ .github/workflows/schedule_work.yml | 35 +++++++++++++++++++++++++ 2 files changed, 75 insertions(+) create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/schedule_work.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000000000..e459052968361 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,40 @@ +name: CI + +on: [pull_request] + +jobs: + ci: + runs-on: ubuntu-latest + name: CI for Pull Request + steps: + - name: Checkout the source code + uses: actions/checkout@v2 + with: + path: src + + - name: Checkout the BlueZ source code + uses: actions/checkout@v2 + with: + repository: BluezTestBot/bluez + path: bluez + + - name: Create output folder + run: | + mkdir results + + - name: CI + uses: BluezTestBot/action-kernel-ci@main + with: + src_path: src + bluez_path: bluez + output_path: results + github_token: ${{ secrets.GITHUB_TOKEN }} + email_token: ${{ secrets.EMAIL_TOKEN }} + patchwork_token: ${{ secrets.PATCHWORK_TOKEN }} + + - name: Upload results + uses: actions/upload-artifact@v2 + with: + name: tester-logs + path: results/ + if-no-files-found: warn diff --git a/.github/workflows/schedule_work.yml b/.github/workflows/schedule_work.yml new file mode 100644 index 0000000000000..7dc607692ad0e --- /dev/null +++ b/.github/workflows/schedule_work.yml @@ -0,0 +1,35 @@ +name: Scheduled Work + +on: + schedule: + - cron: "20 * * * *" + +jobs: + sync_repo: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Sync Repo + uses: BluezTestBot/action-manage-repo@master + with: + src_repo: "bluez/bluetooth-next" + for_upstream_branch: 'for-upstream' + workflow_branch: 'workflow' + github_token: ${{ secrets.GITHUB_TOKEN }} + + sync_patchwork: + needs: sync_repo + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Sync Patchwork + uses: BluezTestBot/action-patchwork-to-pr@master + with: + pw_exclude_str: 'BlueZ' + base_branch: 'workflow' + github_token: ${{ secrets.ACTION_TOKEN }}