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

Feat/add workflow preview prs #347

Merged
merged 1 commit into from
Dec 11, 2024

Conversation

f-hollow
Copy link
Collaborator

@f-hollow f-hollow commented Dec 3, 2024

Description

This PR adds final fixes for workflows to preview PRs.

As can be seen below, the code has been thoroughly tested, so I will merge it without reviews.

Related

Testing

Testing was done in this PR in a fork.

Among other tests, attempts were made to expose the secrets:

      - name: Debug output
        run: echo "AWS Key ${{ secrets.AWS_REGION }}"
        continue-on-error: true

      - name: List environment variables
        run: env
        continue-on-error: true

      - name: Log indirect secret
        run: echo "Prefix-${{ secrets.AWS_REGION }}-Suffix"
        continue-on-error: true

The attempts were unsuccessful, which corroborates the idea that it should be reasonably safe to have workflows for fork PRs that require access to secrets if such workflows use the events:

  • pull_request for checking out and building potentially unsafe code from fork PR
  • workflow_run for tasks that require access to repository secrets, such as deploying previews to an S3 bucket

For details, see Keeping your GitHub Actions and workflows secure Part 1: Preventing pwn requests


Checklist

Before submitting a Pull Request, please ensure the following:

  • 🚨 This PR does not introduce breaking changes.
  • All CI checks (GH Actions) pass.
  • Documentation is updated as needed.
  • Tests are updated or added as necessary.
  • Code is well-commented, especially in complex areas.
  • Git history is clean — commits are squashed to the minimum necessary.

@f-hollow f-hollow force-pushed the feat/add_workflow_preview_prs branch 8 times, most recently from 5e1583d to ba69f3d Compare December 10, 2024 09:09
@f-hollow f-hollow force-pushed the feat/add_workflow_preview_prs branch from ba69f3d to ca925d6 Compare December 11, 2024 06:36
@f-hollow f-hollow merged commit 760021a into espressif:main Dec 11, 2024
4 checks passed
@f-hollow f-hollow deleted the feat/add_workflow_preview_prs branch December 11, 2024 06:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant