From 9f7aba4593bfdd3ac3feed19d9c910207b371a70 Mon Sep 17 00:00:00 2001 From: lolocomotive <49951010+lolocomotive@users.noreply.github.com> Date: Wed, 6 Apr 2022 21:43:46 +0200 Subject: [PATCH] Run upload to firebase only when on UpsilonNumworks/Upsilon on upsilon-dev (#197) --- .github/workflows/ci-workflow.yml | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci-workflow.yml b/.github/workflows/ci-workflow.yml index 2dc7f1be6..43e3d6993 100644 --- a/.github/workflows/ci-workflow.yml +++ b/.github/workflows/ci-workflow.yml @@ -17,7 +17,6 @@ on: description: 'Run 3DS tests' required: true default: 'no' - jobs: nintendo_3ds: if: github.event.inputs.trigger3DS == 'yes' @@ -51,12 +50,12 @@ jobs: submodules: 'recursive' - run: make -j2 PLATFORM=simulator TARGET=android - id: 'auth' - if: ${{ github.event_name == 'push' }} + if: ${{ github.event_name == 'push' && github.ref_name == 'upsilon-dev' && github.repository == 'UpsilonNumworks/Upsilon' }} uses: 'google-github-actions/auth@v0' with: credentials_json: '${{secrets.GOOGLE_CREDENTIALS}}' - id: 'upload-file' - if: ${{ github.event_name == 'push' }} + if: ${{ github.event_name == 'push' && github.ref_name == 'upsilon-dev' && github.repository == 'UpsilonNumworks/Upsilon' }} uses: 'google-github-actions/upload-cloud-storage@v0' with: path: 'output/release/simulator/android/epsilon.apk' @@ -104,12 +103,12 @@ jobs: - run: find final-output/ -type f -exec bash -c "shasum -a 256 -b {} > {}.sha256" \; - run: tar cvfz binpack-n0100.tgz final-output/* - id: 'auth' - if: ${{ github.event_name == 'push'}} + if: ${{ github.event_name == 'push' && github.ref_name == 'upsilon-dev' && github.repository == 'UpsilonNumworks/Upsilon'}} uses: 'google-github-actions/auth@v0' with: credentials_json: '${{secrets.GOOGLE_CREDENTIALS}}' - id: 'upload-directory' - if: ${{ github.event_name == 'push'}} + if: ${{ github.event_name == 'push' && github.ref_name == 'upsilon-dev' && github.repository == 'UpsilonNumworks/Upsilon'}} uses: 'google-github-actions/upload-cloud-storage@v0' with: path: 'final-output/' @@ -138,12 +137,12 @@ jobs: - run: make -j2 binpack - run: cp output/release/device/n0110/binpack-n0110-`git rev-parse HEAD | head -c 7`.tgz output/release/device/n0110/binpack-n0110.tgz - id: 'auth' - if: ${{ github.event_name == 'push' }} + if: ${{ github.event_name == 'push' && github.ref_name == 'upsilon-dev' && github.repository == 'UpsilonNumworks/Upsilon' }} uses: 'google-github-actions/auth@v0' with: credentials_json: '${{secrets.GOOGLE_CREDENTIALS}}' - id: 'upload-directory' - if: ${{ github.event_name == 'push' }} + if: ${{ github.event_name == 'push' && github.ref_name == 'upsilon-dev' && github.repository == 'UpsilonNumworks/Upsilon' }} uses: 'google-github-actions/upload-cloud-storage@v0' with: path: 'output/release/device/n0110/binpack/' @@ -187,12 +186,12 @@ jobs: - run: make -j2 PLATFORM=simulator test.exe - run: cmd /c output\release\simulator\windows\test.exe --headless - id: 'auth' - if: ${{ github.event_name == 'push' }} + if: ${{ github.event_name == 'push' && github.ref_name == 'upsilon-dev' && github.repository == 'UpsilonNumworks/Upsilon' }} uses: 'google-github-actions/auth@v0' with: credentials_json: '${{secrets.GOOGLE_CREDENTIALS}}' - id: 'upload-file' - if: ${{ github.event_name == 'push' }} + if: ${{ github.event_name == 'push' && github.ref_name == 'upsilon-dev' && github.repository == 'UpsilonNumworks/Upsilon' }} uses: 'google-github-actions/upload-cloud-storage@v0' with: path: 'output/release/simulator/windows/epsilon.exe' @@ -215,12 +214,12 @@ jobs: - run: make -j2 PLATFORM=simulator TARGET=web test.js - run: node output/release/simulator/web/test.js --headless - id: 'auth' - if: ${{ github.event_name == 'push' }} + if: ${{ github.event_name == 'push' && github.ref_name == 'upsilon-dev' && github.repository == 'UpsilonNumworks/Upsilon' }} uses: 'google-github-actions/auth@v0' with: credentials_json: '${{secrets.GOOGLE_CREDENTIALS}}' - id: 'upload-file' - if: ${{ github.event_name == 'push' }} + if: ${{ github.event_name == 'push' && github.ref_name == 'upsilon-dev' && github.repository == 'UpsilonNumworks/Upsilon' }} uses: 'google-github-actions/upload-cloud-storage@v0' with: path: 'output/release/simulator/web/epsilon.js' @@ -241,12 +240,12 @@ jobs: - run: make -j2 PLATFORM=simulator test.bin - run: output/release/simulator/linux/test.bin --headless - id: 'auth' - if: ${{ github.event_name == 'push' }} + if: ${{ github.event_name == 'push' && github.ref_name == 'upsilon-dev' && github.repository == 'UpsilonNumworks/Upsilon' }} uses: 'google-github-actions/auth@v0' with: credentials_json: '${{secrets.GOOGLE_CREDENTIALS}}' - id: 'upload-file' - if: ${{ github.event_name == 'push' }} + if: ${{ github.event_name == 'push' && github.ref_name == 'upsilon-dev' && github.repository == 'UpsilonNumworks/Upsilon' }} uses: 'google-github-actions/upload-cloud-storage@v0' with: path: 'output/release/simulator/linux/epsilon.bin'