Skip to content

Commit

Permalink
ci: Exclude writing actions on forks (#562)
Browse files Browse the repository at this point in the history
Co-authored-by: peaceiris <30958501+peaceiris@users.noreply.github.com>
  • Loading branch information
oprypin and peaceiris authored Jan 21, 2021
1 parent 87b7480 commit fcead0e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/dev-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ jobs:
- run: make ci
- run: make all
- run: docker-compose push
if: github.ref == 'refs/heads/main'
if: github.ref == 'refs/heads/main' && github.event.repository.fork == false
10 changes: 5 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ jobs:
- name: Deploy
if: |
startsWith(matrix.os, 'ubuntu-18.04') &&
github.ref == 'refs/heads/main'
github.ref == 'refs/heads/main' && github.event.repository.fork == false
uses: ./
with:
# deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
Expand All @@ -117,7 +117,7 @@ jobs:
- name: Deploy
if: |
startsWith(matrix.os, 'ubuntu-16.04') &&
github.ref == 'refs/heads/main'
github.ref == 'refs/heads/main' && github.event.repository.fork == false
uses: ./
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
Expand All @@ -135,7 +135,7 @@ jobs:
- name: Deploy
if: |
startsWith(matrix.os, 'macos') &&
github.ref == 'refs/heads/main'
github.ref == 'refs/heads/main' && github.event.repository.fork == false
uses: ./
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
Expand All @@ -154,7 +154,7 @@ jobs:
- name: Deploy
if: |
startsWith(matrix.os, 'windows') &&
github.ref == 'refs/heads/main'
github.ref == 'refs/heads/main' && github.event.repository.fork == false
uses: ./
with:
# deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
Expand All @@ -173,7 +173,7 @@ jobs:
- name: Deploy
if: |
startsWith(matrix.os, 'ubuntu-20.04') &&
github.ref == 'refs/heads/main'
github.ref == 'refs/heads/main' && github.event.repository.fork == false
uses: ./
with:
# deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
Expand Down

0 comments on commit fcead0e

Please sign in to comment.