[Internal] Fix build uses different tokens (#3121)

* Fix build uses different tokens.

* If expression syntax

* Restrict Upload to main repo, remove echo

Co-authored-by: Catenocrypt <catenocrypt@users.noreply.github.com>
This commit is contained in:
Adam R 2020-08-07 12:47:01 +02:00 committed by GitHub
parent 9d21e92bb2
commit 662662843e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 2 deletions

View File

@ -7,7 +7,15 @@ jobs:
fix:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Checkout (trustwallet repo, secret token)
if: github.repository_owner == 'trustwallet'
uses: actions/checkout@v2
with:
token: ${{ secrets.DANGER_GITHUB_API_TOKEN }}
ref: ${{ github.ref }}
- name: Checkout (fork repo, default token)
if: github.repository_owner != 'trustwallet'
uses: actions/checkout@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
ref: ${{ github.ref }}

View File

@ -8,7 +8,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: jakejarvis/s3-sync-action@master
- name: Upload (from main repo only)
if: github.repository_owner == 'trustwallet'
uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read --follow-symlinks --delete --exclude '*' --include 'dapps/*' --include 'blockchains/*'
env: