Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: update adev-preview-deployment to no longer use metadata from build output #988

Merged
merged 1 commit into from
Sep 27, 2024

Conversation

josephperrott
Copy link
Member

Use the github event values instead of the user generated information.

- name: Deploy to Firebase Hosting Preview
id: firebase-deploy
uses: FirebaseExtended/action-hosting-deploy@v0.9.0
with:
repoToken: "${{ secrets.GITHUB_TOKEN }}"
firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT }}"
projectId: angular-ja
channelId: pr-${{ steps.pr-number.outputs.value }}
channelId: pr-${{ github.event.workflow_run.pull_requests.number }}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder how the line here works because GHA documentation says workflow_run.pull_requests is typed as an array of objects.
https://docs.github.com/en/webhooks/webhook-events-and-payloads#workflow_run

@josephperrott Have you seen other repositories that uses workflow_run.pull_requests.number like here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After looking closer into it, it seems that it won't work with this method of extraction, additionally it seems that if a change comes from a fork then it won't provide the pull request at all. So I reverted back to how it was extracted before.

…ld output

Use the github event values instead of the user generated information.
@lacolaco
Copy link
Collaborator

Thanks!

@lacolaco lacolaco merged commit 26f3423 into angular:main Sep 27, 2024
5 checks passed
@josephperrott josephperrott deleted the update-action branch October 30, 2024 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants