dispatch #3623
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
--- | |
name: dispatch | |
on: | |
schedule: | |
- cron: '*/15 * * * *' | |
workflow_dispatch: | |
inputs: | |
limit: | |
description: '--limit' | |
required: false | |
default: 5 # If you change this, then also address CHANGES_LIMIT | |
jobs: | |
gerrit_to_github: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
actions: write | |
concurrency: | |
group: dispatcher | |
cancel-in-progress: false | |
steps: | |
- name: Change git config for GitHub Service Account | |
run: | | |
git config --global user.name "GitHub Service" | |
git config --global user.email "[email protected]" | |
- name: Checkout CI repository | |
uses: actions/[email protected] | |
with: | |
token: ${{ secrets.GHPA_TOKEN }} | |
path: ci | |
- name: Checkout SPDK repository | |
uses: actions/[email protected] | |
with: | |
repository: ${{ github.repository_owner }}/${{ vars.SPDK_REPOS_NAME }} | |
token: ${{ secrets.GHPA_TOKEN }} | |
path: spdk | |
fetch-depth: 0 | |
- name: Add Gerrit-hosted-git to SPDK repository remotes | |
run: | | |
git -C spdk remote add gerrit https://review.spdk.io/gerrit/spdk/spdk | |
git -C spdk fetch gerrit | |
- name: Retrieve Changes from Gerrit, Push to GitHub and trigger! | |
env: | |
CHANGES_LIMIT: ${{ github.event.inputs.limit || 5 }} | |
GHPA_TOKEN: ${{ secrets.GHPA_TOKEN }} | |
GERRIT_PASSWORD: ${{ secrets.GERRIT_PASSWORD}} | |
LAST_TIMESTAMP: ${{ vars.LAST_TIMESTAMP}} | |
run: | | |
./ci/gerrit_changes_to_github.py \ | |
--gerrit-username "spdk-community-ci-samsung" \ | |
--gerrit-api-url "https://review.spdk.io/gerrit/changes/?q=status:open+-age:6mon+repo:spdk/spdk+-label:Community-CI=ANY,user=spdk-community-ci-samsung+-%22%5BRFC%5D%22&o=CURRENT_REVISION" \ | |
--gerrit-events-log-url "https://review.spdk.io/a/plugins/events-log/events/" \ | |
--gh-variables-url "https://api.github.com/repos/spdk-community-ci/dispatcher/actions/variables/" \ | |
--git-repository-path spdk \ | |
--git-remote-target-name origin \ | |
--git-remote-gerrit-name gerrit \ | |
--workflows autorun.yml \ | |
--log gerrit_changes_to_github.log \ | |
--limit ${CHANGES_LIMIT} | |
- name: Upload Artifacts | |
uses: actions/[email protected] | |
with: | |
path: gerrit_changes_to_github.log |