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

Add check-run-api #6

Open
wants to merge 11 commits into
base: develop
Choose a base branch
from
Open
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
41 changes: 36 additions & 5 deletions .github/workflows/pr-trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,43 @@ on:
types:
- labeled


jobs:
check-if-we-can-run:
# check-if-we-can-run:
# runs-on: ubuntu-latest
# if: ${{github.event.action == 'labeled' && github.event.label.name == 'ci'}}
# steps:
# - name: Run on label
# run: |
# echo "Completed"
workflow-dispatch:
runs-on: ubuntu-latest
if: ${{github.event.action == 'labeled' && github.event.label.name == 'ci'}}
steps:
- name: Run on label
run: |
echo "Completed"
- uses: LouisBrunner/[email protected]
id: check
with:
sha: ${{ github.sha }}
token: ${{ secrets.GITHUB_TOKEN }}
name: build-image
status: in_progress

- name: Trigger test-workflow
id: trigger-test-workflow
uses: aurelien-baudet/[email protected]
with:
repo: RahulKumar1606/test-repo
ref: ${{ github.event.pull_request.head.ref }}
workflow: test-workflow.yml
token: ${{ secrets.BOT_GITHUB_TOKEN }}
wait-for-completion: true
display-workflow-run-url: true

- uses: LouisBrunner/[email protected]
if: failure()
with:
sha: ${{ github.sha }}
token: ${{ secrets.GITHUB_TOKEN }}
name: build-image
conclusion: ${{ job.status }}
output: |
{"summary":""}
45 changes: 37 additions & 8 deletions .github/workflows/test-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,39 @@ name: Test Workflow
on:
repository_dispatch:
types: [ test ]
# workflow_run:
# workflows:
# - pr-trigger
# types:
# - completed
workflow_dispatch:
pull_request:


jobs:
build-image:
runs-on: ubuntu-latest
env:
SLACK_TOKEN: ${{ secrets.SLACK_TOKEN }}
steps:
- name: Check out the repo
uses: actions/checkout@v2
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
token: ${{ secrets.BOT_GITHUB_TOKEN }}

- name: check if trigger by label
run: |
echo "Hello world"
echo ${{github.event.action}}
echo ${{github.event.label.name}}

- uses: LouisBrunner/[email protected]
if: always()
with:
sha: ${{ github.sha }}
token: ${{ secrets.GITHUB_TOKEN }}
name: build-image
conclusion: ${{ job.status }}
output: |
{"summary":""}

build-image2:
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v2
with:
Expand All @@ -27,5 +45,16 @@ jobs:

- name: check if trigger by label
run: |
echo "Hello world"
echo ${{github.event.action}}
echo ${{github.event.label.name}}

- uses: LouisBrunner/[email protected]
if: always()
with:
sha: ${{ github.sha }}
token: ${{ secrets.GITHUB_TOKEN }}
name: build-image2
conclusion: ${{ job.status }}
output: |
{"summary":""}
38 changes: 0 additions & 38 deletions .github/workflows/test-workflow2.yml

This file was deleted.

Loading