Skip to content

Conversation

@ydcjeff
Copy link
Contributor

@ydcjeff ydcjeff commented Jun 19, 2021

fix: #2066

Description: Run linkcheck job only on push and pull events

Check list:

  • New tests are added (if a new feature is added)
  • New doc strings: description and/or example code are in RST format
  • Documentation is updated (if required)

@github-actions github-actions bot added the ci CI label Jun 19, 2021
@trsvchn
Copy link
Collaborator

trsvchn commented Jun 19, 2021

Thanks @ydcjeff !

But I think it still will be triggered only for master push events, and all branches pull_request events right?

@ydcjeff
Copy link
Contributor Author

ydcjeff commented Jun 19, 2021

Thanks @ydcjeff !

But I think it still will be triggered only for master push events, and all branches pull_request events right?

Yes, we can edit branch for push events

@trsvchn
Copy link
Collaborator

trsvchn commented Jun 19, 2021

we need smth like this, in pseudo code:

on:
  push:
    branches: all
  pull_request:
    branches: all
  release:
    types: [published]

jobs:
  build-deploy:
    if:  (branch == master AND github.event_name == 'push')) OR (gh.event == release)
...
  linkcheck:
    if: github.event_name == 'pull_request' || github.event_name == 'push'

@ydcjeff
Copy link
Contributor Author

ydcjeff commented Jun 19, 2021

Assuming we are doing push, pull, and release, current workflow file is doing the same as the pseudo code.

@trsvchn
Copy link
Collaborator

trsvchn commented Jun 19, 2021

Current workflow looks like this:

on:
  push:
    branches: all
  pull_request:
    branches: all
  release:
    types: [published]

jobs:
  build-deploy:
    if:  (branch == master AND github.event_name == 'push') OR (gh.event == release)
...
  linkcheck:
    if: github.event_name == 'pull_request' OR (github.event_name == 'push' AND (branch == master)) OR gh.event == release

@ydcjeff
Copy link
Contributor Author

ydcjeff commented Jun 19, 2021

Sorry, I mean this PR workflow file

@trsvchn
Copy link
Collaborator

trsvchn commented Jun 19, 2021

Let's call it "proposed" :)

Proposed workflow looks like this:

on:
  push:
    branches: all
  pull_request:
    branches: all
  release:
    types: [published]

jobs:
  build-deploy:
    if:  (branch == master AND github.event_name == 'push') OR (gh.event == release)
...
  linkcheck:
    if: github.event_name == 'pull_request' OR (github.event_name == 'push' AND (branch == master))

@vfdev-5 vfdev-5 requested a review from trsvchn June 20, 2021 12:23
Copy link
Collaborator

@trsvchn trsvchn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks @ydcjeff !

@vfdev-5 vfdev-5 merged commit 0b65f02 into pytorch:master Jun 20, 2021
@ydcjeff ydcjeff deleted the patch-1 branch June 20, 2021 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

linkcheck job fails on release event

3 participants