build: Only build and push ci-runner Docker image on origin repo (#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.
This commit is contained in:
Tim McCormack
2023-10-18 16:00:26 -04:00
committed by GitHub
parent 44a04a5342
commit 443753d864

View File

@@ -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: