From 09efb821c3fa5d5de32567a1545439f320b73ca3 Mon Sep 17 00:00:00 2001 From: Ehsan Date: Tue, 29 Aug 2023 17:39:17 +0400 Subject: [PATCH 1/6] Update firebase-hosting-pull-request.yml --- .github/workflows/firebase-hosting-pull-request.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/firebase-hosting-pull-request.yml b/.github/workflows/firebase-hosting-pull-request.yml index 3bbbdb0..3f156db 100644 --- a/.github/workflows/firebase-hosting-pull-request.yml +++ b/.github/workflows/firebase-hosting-pull-request.yml @@ -9,6 +9,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + with: + ref: ${{ github.head_ref }} - uses: FirebaseExtended/action-hosting-deploy@v0 with: repoToken: '${{ secrets.GITHUB_TOKEN }}' From 748f9e4a76148fb30044befdf8d5122ccbe83c46 Mon Sep 17 00:00:00 2001 From: Ehsan Date: Tue, 29 Aug 2023 17:47:26 +0400 Subject: [PATCH 2/6] Update firebase-hosting-pull-request.yml --- .github/workflows/firebase-hosting-pull-request.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/firebase-hosting-pull-request.yml b/.github/workflows/firebase-hosting-pull-request.yml index 3f156db..c316435 100644 --- a/.github/workflows/firebase-hosting-pull-request.yml +++ b/.github/workflows/firebase-hosting-pull-request.yml @@ -5,7 +5,7 @@ name: Deploy to Firebase Hosting on PR 'on': pull_request_target jobs: build_and_preview: - if: '${{ github.event.pull_request.head.repo.full_name == github.repository }}' + if: '${{ github.event.pull_request_target.head.repo.full_name == github.repository }}' runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 From e15c3a7bb389501c1d0e0e560d1b1e27c6b95390 Mon Sep 17 00:00:00 2001 From: Ehsan Date: Tue, 29 Aug 2023 18:03:37 +0400 Subject: [PATCH 3/6] Update firebase-hosting-pull-request.yml --- .github/workflows/firebase-hosting-pull-request.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/firebase-hosting-pull-request.yml b/.github/workflows/firebase-hosting-pull-request.yml index c316435..7692aa1 100644 --- a/.github/workflows/firebase-hosting-pull-request.yml +++ b/.github/workflows/firebase-hosting-pull-request.yml @@ -5,12 +5,10 @@ name: Deploy to Firebase Hosting on PR 'on': pull_request_target jobs: build_and_preview: - if: '${{ github.event.pull_request_target.head.repo.full_name == github.repository }}' + if: '${{ github.event.pull_request.base.repo.full_name == github.repository }}' runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - with: - ref: ${{ github.head_ref }} - uses: FirebaseExtended/action-hosting-deploy@v0 with: repoToken: '${{ secrets.GITHUB_TOKEN }}' From a29c91fd732fe36a9574943fd92c863700f7a4fe Mon Sep 17 00:00:00 2001 From: Ehsan Date: Tue, 29 Aug 2023 18:09:36 +0400 Subject: [PATCH 4/6] Update firebase-hosting-pull-request.yml --- .github/workflows/firebase-hosting-pull-request.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/firebase-hosting-pull-request.yml b/.github/workflows/firebase-hosting-pull-request.yml index 7692aa1..7534e7c 100644 --- a/.github/workflows/firebase-hosting-pull-request.yml +++ b/.github/workflows/firebase-hosting-pull-request.yml @@ -5,10 +5,11 @@ name: Deploy to Firebase Hosting on PR 'on': pull_request_target jobs: build_and_preview: - if: '${{ github.event.pull_request.base.repo.full_name == github.repository }}' runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + with: + ref: ${{ github.head_ref }} - uses: FirebaseExtended/action-hosting-deploy@v0 with: repoToken: '${{ secrets.GITHUB_TOKEN }}' From 3e9aca406a8cef80f85bcb8318811049aec42bbd Mon Sep 17 00:00:00 2001 From: Ehsan Date: Tue, 29 Aug 2023 18:14:05 +0400 Subject: [PATCH 5/6] Update firebase-hosting-pull-request.yml --- .github/workflows/firebase-hosting-pull-request.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/firebase-hosting-pull-request.yml b/.github/workflows/firebase-hosting-pull-request.yml index 7534e7c..44ffcda 100644 --- a/.github/workflows/firebase-hosting-pull-request.yml +++ b/.github/workflows/firebase-hosting-pull-request.yml @@ -1,6 +1,3 @@ -# This file was auto-generated by the Firebase CLI -# https://github.com/firebase/firebase-tools - name: Deploy to Firebase Hosting on PR 'on': pull_request_target jobs: @@ -8,10 +5,11 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - with: - ref: ${{ github.head_ref }} + - name: Set branch name + run: echo "BRANCH_NAME=${{ github.head_ref }}" >> $GITHUB_ENV - uses: FirebaseExtended/action-hosting-deploy@v0 with: repoToken: '${{ secrets.GITHUB_TOKEN }}' firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_ASTAR_TOKEN_API }}' projectId: astar-token-api + onlyBranches: ${{ env.BRANCH_NAME }} From 6746a19e2e186be902f579a166f64188e6167bbc Mon Sep 17 00:00:00 2001 From: Ehsan Date: Tue, 29 Aug 2023 18:17:40 +0400 Subject: [PATCH 6/6] Update firebase-hosting-pull-request.yml --- .github/workflows/firebase-hosting-pull-request.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/firebase-hosting-pull-request.yml b/.github/workflows/firebase-hosting-pull-request.yml index 44ffcda..ab91773 100644 --- a/.github/workflows/firebase-hosting-pull-request.yml +++ b/.github/workflows/firebase-hosting-pull-request.yml @@ -1,15 +1,16 @@ +# This file was auto-generated by the Firebase CLI +# https://github.com/firebase/firebase-tools + name: Deploy to Firebase Hosting on PR -'on': pull_request_target +'on': pull_request jobs: build_and_preview: + if: '${{ github.event.pull_request.head.repo.full_name == github.repository }}' runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - name: Set branch name - run: echo "BRANCH_NAME=${{ github.head_ref }}" >> $GITHUB_ENV - uses: FirebaseExtended/action-hosting-deploy@v0 with: repoToken: '${{ secrets.GITHUB_TOKEN }}' firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_ASTAR_TOKEN_API }}' projectId: astar-token-api - onlyBranches: ${{ env.BRANCH_NAME }}