Skip to content

Commit

Permalink
Fix the way we check repo owner on cd workflows (#1898)
Browse files Browse the repository at this point in the history
  • Loading branch information
shohamazon authored Jul 9, 2024
1 parent eda6383 commit 4018de3
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 11 deletions.
1 change: 0 additions & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ jobs:
run: make test

build-amazonlinux-latest:
if: github.repository_owner == 'valkey-io'
strategy:
# Run all jobs
fail-fast: false
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/java-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ permissions:

jobs:
start-self-hosted-runner:
if: github.repository_owner == 'valkey-io'
if: github.event.pull_request.head.repo.owner.login == 'valkey-io'
runs-on: ubuntu-latest
environment: AWS_ACTIONS
steps:
Expand All @@ -43,7 +43,7 @@ jobs:

create-binaries-to-publish:
needs: start-self-hosted-runner
if: github.repository_owner == 'valkey-io'
if: github.event.pull_request.head.repo.owner.login == 'valkey-io'
timeout-minutes: 35
env:
JAVA_VERSION: '11'
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ jobs:
java/client/build/reports/spotbugs/**
build-amazonlinux-latest:
if: github.repository_owner == 'valkey-io'
strategy:
# Run all jobs
fail-fast: false
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/npm-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,10 @@ permissions:

jobs:
start-self-hosted-runner:
if: github.repository_owner == 'valkey-io'
if: github.event.pull_request.head.repo.owner.login == 'valkey-io'
runs-on: ubuntu-latest
environment: AWS_ACTIONS
steps:
- run: echo $OWNER
env:
OWNER: ${{ github.repository_owner }}
- name: Checkout
uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -67,7 +64,7 @@ jobs:
publish-binaries:
needs: [start-self-hosted-runner, load-platform-matrix]
if: github.repository_owner == 'valkey-io'
if: github.event.pull_request.head.repo.owner.login == 'valkey-io'
name: Publish packages to NPM
runs-on: ${{ matrix.build.RUNNER }}
container:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pypi-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
start-self-hosted-runner:
if: github.repository_owner == 'valkey-io'
if: github.event.pull_request.head.repo.owner.login == 'valkey-io'
runs-on: ubuntu-latest
environment: AWS_ACTIONS
steps:
Expand All @@ -61,7 +61,7 @@ jobs:

publish-binaries:
needs: [start-self-hosted-runner, load-platform-matrix]
if: github.repository_owner == 'valkey-io'
if: github.event.pull_request.head.repo.owner.login == 'valkey-io'
name: Publish packages to PyPi
runs-on: ${{ matrix.build.RUNNER }}
timeout-minutes: 25
Expand Down

0 comments on commit 4018de3

Please sign in to comment.