fix(ci): do not trigger releasing to s3 on pull requests
This commit is contained in:
parent
edbdbcf38e
commit
f440f57be2
12
.github/workflows/publish-dist.yml
vendored
12
.github/workflows/publish-dist.yml
vendored
@ -28,6 +28,7 @@ jobs:
|
|||||||
echo IS_MAINNET_RELEASE=false >> $GITHUB_ENV
|
echo IS_MAINNET_RELEASE=false >> $GITHUB_ENV
|
||||||
echo IS_TESTNET_RELEASE=false >> $GITHUB_ENV
|
echo IS_TESTNET_RELEASE=false >> $GITHUB_ENV
|
||||||
echo IS_IPFS_RELEASE=false >> $GITHUB_ENV
|
echo IS_IPFS_RELEASE=false >> $GITHUB_ENV
|
||||||
|
echo IS_S3_RELASE=false >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Is PR
|
- name: Is PR
|
||||||
if: ${{ github.event_name == 'pull_request' }}
|
if: ${{ github.event_name == 'pull_request' }}
|
||||||
@ -49,6 +50,11 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
echo IS_IPFS_RELEASE=true >> $GITHUB_ENV
|
echo IS_IPFS_RELEASE=true >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Is S3 Release
|
||||||
|
if: ${{ env.IS_IPFS_RELASE == 'false' && github.event_name == 'push' }}
|
||||||
|
run: |
|
||||||
|
echo IS_S3_RELASE=true >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
id: quemu
|
id: quemu
|
||||||
uses: docker/setup-qemu-action@v2
|
uses: docker/setup-qemu-action@v2
|
||||||
@ -245,7 +251,7 @@ jobs:
|
|||||||
- name: Publish dist to s3
|
- name: Publish dist to s3
|
||||||
uses: jakejarvis/s3-sync-action@master
|
uses: jakejarvis/s3-sync-action@master
|
||||||
# s3 releases are not happening for trading on mainnet - it's IPFS
|
# s3 releases are not happening for trading on mainnet - it's IPFS
|
||||||
if: ${{ env.IS_IPFS_RELEASE == 'false' }}
|
if: ${{ env.IS_S3_RELASE == 'true' }}
|
||||||
with:
|
with:
|
||||||
args: --acl private --follow-symlinks --delete
|
args: --acl private --follow-symlinks --delete
|
||||||
env:
|
env:
|
||||||
@ -256,11 +262,11 @@ jobs:
|
|||||||
SOURCE_DIR: 'dist-result'
|
SOURCE_DIR: 'dist-result'
|
||||||
|
|
||||||
- name: Install aws CLI
|
- name: Install aws CLI
|
||||||
if: ${{ env.IS_IPFS_RELEASE == 'false' }}
|
if: ${{ env.IS_S3_RELASE == 'true' }}
|
||||||
uses: unfor19/install-aws-cli-action@master
|
uses: unfor19/install-aws-cli-action@master
|
||||||
|
|
||||||
- name: Perform cache invalidation
|
- name: Perform cache invalidation
|
||||||
if: ${{ env.IS_IPFS_RELEASE == 'false' }}
|
if: ${{ env.IS_S3_RELASE == 'true' }}
|
||||||
env:
|
env:
|
||||||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||||
|
Loading…
Reference in New Issue
Block a user