Skip to content

Commit

Permalink
build: Only build and push ci-runner Docker image on origin repo (ope…
Browse files Browse the repository at this point in the history
…nedx#33535)

I get a weekly CI failure email due to this scheduled workflow running on
my fork of edx-platform. Cancelling the job when it runs on a fork prevents
this.
  • Loading branch information
timmc-edx committed Oct 18, 2023
1 parent 44a04a5 commit 443753d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/publish-ci-docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,15 @@ jobs:
- name: Checkout
uses: actions/checkout@v2

# This has to happen after checkout in order for gh to work.
- name: "Cancel scheduled job on forks"
if: github.repository != 'openedx/edx-platform' && github.event_name == 'schedule'
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
run: |
gh run cancel "${{ github.run_id }}"
gh run watch "${{ github.run_id }}"
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
Expand Down

0 comments on commit 443753d

Please sign in to comment.