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

ci: Ensure the CD-related workflows won't run on forks #446

Merged
merged 1 commit into from
Oct 13, 2021
Merged
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
3 changes: 3 additions & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ on:
jobs:
build_test_server:
name: Build learn-ocaml and run tests
if: ${{ github.event_name != 'schedule' || github.repository == 'ocaml-sf/learn-ocaml' }}
runs-on: ubuntu-latest
steps:
- name: Check out the repo
Expand All @@ -29,6 +30,7 @@ jobs:

client_using_other_server:
name: Build learn-ocaml-client and run quick tests
if: ${{ github.event_name != 'schedule' || github.repository == 'ocaml-sf/learn-ocaml' }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand All @@ -53,6 +55,7 @@ jobs:

build_extra_tests:
name: Run dockerized tests
if: ${{ github.event_name != 'schedule' || github.repository == 'ocaml-sf/learn-ocaml' }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/deploy-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
jobs:
push_server:
name: Push learn-ocaml image to Docker Hub
if: ${{ github.repository == 'ocaml-sf/learn-ocaml' }}
runs-on: ubuntu-latest
steps:
- name: Check out the repo
Expand All @@ -26,6 +27,7 @@ jobs:
tags: master
push_client:
name: Push learn-ocaml-client image to Docker Hub
if: ${{ github.repository == 'ocaml-sf/learn-ocaml' }}
runs-on: ubuntu-latest
steps:
- name: Check out the repo
Expand All @@ -43,6 +45,7 @@ jobs:
tags: master
push_emacs_client:
name: Push emacs-learn-ocaml-client image to Docker Hub
if: ${{ github.repository == 'ocaml-sf/learn-ocaml' }}
needs: push_client
runs-on: ubuntu-latest
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
release-please:
name: Create Release
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
if: ${{ github.event.workflow_run.conclusion == 'success' && github.repository == 'ocaml-sf/learn-ocaml'}}
outputs:
release_created: ${{ steps.release.outputs.release_created }}
upload_url: ${{ steps.release.outputs.upload_url }}
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/static-builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ on:
jobs:
static-bin-linux:
name: Builds static Linux binaries
if: ${{ github.event_name != 'schedule' || github.repository == 'ocaml-sf/learn-ocaml' }}
runs-on: ubuntu-latest
strategy:
matrix:
Expand Down Expand Up @@ -43,6 +44,7 @@ jobs:
path: ${{ matrix.artifact }}
static-bin-macos:
name: Builds static Macos binaries
if: ${{ github.event_name != 'schedule' || github.repository == 'ocaml-sf/learn-ocaml' }}
runs-on: macos-latest
env:
OPAMYES: 1
Expand Down