-
Notifications
You must be signed in to change notification settings - Fork 399
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
removed github app repo dependency from the workflow files
- Loading branch information
1 parent
c955da4
commit f2ffdfa
Showing
8 changed files
with
131 additions
and
80 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,68 @@ | ||
name: 'Organization workflow action' | ||
on: | ||
workflow_call: | ||
inputs: | ||
run_id: | ||
description: 'ID of workflow run (provided via GitHub syntax `github.run_id`)' | ||
required: true | ||
type: string | ||
repositroy_owner: | ||
description: 'repositroy_owner of original commit (provided by GitHub app via `github.event.client_payload.repository.owner`)' | ||
required: true | ||
type: string | ||
repositroy_name: | ||
description: 'repositroy_name of original commit (provided by GitHub app via `github.event.client_payload.repository.name`)' | ||
required: true | ||
type: string | ||
check_run_name: | ||
description: 'Name of check (Use `github.workflow` to use the name of the workflow)' | ||
required: true | ||
type: string | ||
head_sha: | ||
description: 'head_sha of original commit (provided by GitHub app via `github.event.client_payload.sha`)' | ||
required: true | ||
type: string | ||
github_token: | ||
description: 'github_token is a token (provided by GitHub app via `github.event.client_payload.token`)' | ||
required: true | ||
type: string | ||
event_type: | ||
description: 'event_type triggered by the GitHub App (provided by GitHub app via `github.event.client_payload.event_type`)' | ||
required: true | ||
type: string | ||
default_organization_repository: | ||
description: 'default_organization_repository will be workflow repo name where we will have all the workflow related config files' | ||
required: true | ||
type: string | ||
jobs: | ||
reusable_workflow_job: | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Create check run | ||
- name: GitHub API Request to create a check | ||
uses: octokit/request-action@v2.x | ||
id: create_check_run | ||
with: | ||
route: POST /repos/{owner}/{repo}/check-runs | ||
owner: ${{ inputs.repositroy_owner }} | ||
repo: ${{ inputs.repositroy_name }} | ||
name: ${{ inputs.check_run_name }} | ||
head_sha: ${{ inputs.head_sha }} | ||
status: in_progress | ||
details_url: "https://github.com/${{ inputs.repositroy_owner}}/${{ inputs.default_organization_repository }}/actions/runs/${{ inputs.run_id }}" | ||
env: | ||
GITHUB_TOKEN: ${{ inputs.github_token }} | ||
- name: Create metadata | ||
id: create-metadata-json | ||
run: | | ||
echo '{ | ||
"check_run_type": "${{ inputs.event_type }}", | ||
"repository_name": "${{ inputs.repositroy_name }}", | ||
"check_run_id": ${{ fromJson(steps.create_check_run.outputs.data).id }} | ||
}' > workflow-metadata.json | ||
shell: bash | ||
- name: Save metadata | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: workflow-metadata | ||
path: workflow-metadata.json |
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
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
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
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