Skip to content
Permalink
Browse files

[github] move condition at step level

instead of job level

this should stop the spammy notification about failing jobS2
  • Loading branch information
3nids committed Jan 14, 2020
1 parent 84563cb commit 76021743690cdc564fe05bdb914883cf5ba23e88
Showing with 9 additions and 2 deletions.
  1. +1 −1 .github/workflows/backport.yml
  2. +8 −1 .github/workflows/pr_to_doc_issue.yml
@@ -7,11 +7,11 @@ on:

jobs:
backport:
if: contains( join(github.event.pull_request.labels.*.name), 'backport')
runs-on: ubuntu-18.04
name: Backport
steps:
- name: Backport Bot
if: contains( join(github.event.pull_request.labels.*.name), 'backport')
uses: Gaurav0/backport@v1.0.24
with:
bot_username: qgis-bot
@@ -9,13 +9,13 @@ on:

jobs:
pr2docissue:
if: github.event.pull_request.merged && contains( github.event.pull_request.labels.*.name, 'Needs Documentation')
runs-on: ubuntu-latest
name: Create issue on doc repo for labeled issue
steps:

# obfuscate the github token so it can be used on jobs triggered from forks
- name: Clear GH Token
if: github.event.pull_request.merged && contains( github.event.pull_request.labels.*.name, 'Needs Documentation')
id: token
uses: opengisch/clear-token@v1.0.12
with:
@@ -24,6 +24,7 @@ jobs:

# transform the milestone (e.g. 3.10.4) to a doc label (3.10)
- name: QGIS milestone to Doc label
if: cancelled() == false
id: milestone2label
env:
MILESTONE: ${{ github.event.pull_request.milestone.title }}
@@ -35,6 +36,7 @@ jobs:
# get the PR body
- name: Get PR body as JSON
if: cancelled() == false
id: get_pr_info
uses: octokit/request-action@v2.x
env:
@@ -45,6 +47,7 @@ jobs:

# extract body from json output
- name: Get PR body as text
if: cancelled() == false
id: get_pr_body
uses: gr2m/get-json-paths-action@v1.x
with:
@@ -53,6 +56,7 @@ jobs:

# get commits from the PR
- name: Get PR commits
if: cancelled() == false
uses: octokit/request-action@v2.x
id: get_pr_commits
env:
@@ -63,6 +67,7 @@ jobs:

# extracts the matching commits
- name: Filter commits with \[needs?.doc(umentation)?s?\]
if: cancelled() == false
id: filtered_commits
env:
JSON_DATA: ${{ steps.get_pr_commits.outputs.data }}
@@ -72,6 +77,7 @@ jobs:
# create the documentation issue
- name: Create Documentation issue
if: cancelled() == false
id: doc_issue
uses: maxkomarychev/oction-create-issue@v0.7.1
with:
@@ -98,6 +104,7 @@ jobs:
# write comment to ping the PR author
- name: Create comment
if: cancelled() == false
uses: peter-evans/create-or-update-comment@v1
with:
token: ${{ steps.token.outputs.token }}

0 comments on commit 7602174

Please sign in to comment.
You can’t perform that action at this time.