FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Update action-hosting-deploy workflow template by jhuleatt · Pull Request #3326 · firebase/firebase-tools · GitHub

Update action-hosting-deploy workflow template - #3326

Merged
jhuleatt merged 5 commits into
masterfrom
jhuleatt-previewaction-limit-forks
Apr 30, 2021
Merged

Update action-hosting-deploy workflow template#3326
jhuleatt merged 5 commits into
masterfrom
jhuleatt-previewaction-limit-forks

Conversation

jhuleatt commented Apr 30, 2021
edited
Loading

Copy link
Copy Markdown
Contributor

Description

Update the default workflow template for the Deploy to Firebase Hosting action:

  • Don't run on forks. Github secrets aren't available to forks, so the action will always fail on a PR from a fork.
  • Remove the preview flag because channels aren't in preview any more

We check to see if a PR is from a fork with:

if: '${{ github.event.pull_request.head.repo.full_name == github.repository }}'

I found the check in this community post, and @samtstern tested it in google/devlibrary#18

Scenarios Tested

firebase init hosting:github

Here's the diff between the old output of firebase-hosting-pull-request.yml and the new one:

# 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
jobs:
  build_and_preview:
+   if: '${{ github.event.pull_request.head.repo.full_name == github.repository }}'
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: FirebaseExtended/action-hosting-deploy@v0
        with:
          repoToken: '${{ secrets.GITHUB_TOKEN }}'
          firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_MY_PROJECT }}'
          projectId: my-project
-       env:
-         FIREBASE_CLI_PREVIEWS: hostingchannels

google-cla Bot added the cla: yes Manual indication that this has passed CLA. label Apr 30, 2021
jhuleatt marked this pull request as ready for review April 30, 2021 14:11
jhuleatt requested review from bkendall and samtstern April 30, 2021 14:11
samtstern self-requested a review April 30, 2021 14:20
Comment thread src/init/features/hosting/github.ts Outdated
jhuleatt merged commit a0d657c into master Apr 30, 2021
bkendall deleted the jhuleatt-previewaction-limit-forks branch August 4, 2021 19:26
devpeerapong pushed a commit to devpeerapong/firebase-tools that referenced this pull request Dec 14, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes Manual indication that this has passed CLA.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL