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

Skip preview jobs on fork repositories #763

Merged
merged 3 commits into from
Mar 18, 2025

Conversation

reakaleek
Copy link
Member

@reakaleek reakaleek commented Mar 17, 2025

Changes

This change will make the jobs skip on forks.
But they will still run on the upstream repo, even on PRs from forks.

Context

This workflow does not work on workflows running on the fork itself because of the aws auth step.

Related

@Copilot Copilot bot review requested due to automatic review settings March 17, 2025 23:18
@reakaleek reakaleek requested a review from a team as a code owner March 17, 2025 23:18
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces conditions in GitHub Actions workflows to skip preview jobs on fork repositories.

  • Added a conditional check in the preview-build workflow to only run jobs on non-fork repositories.
  • Applied a similar condition in the preview-cleanup workflow to prevent cleanup jobs on fork repositories.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
.github/workflows/preview-build.yml Adds a conditional check (if: github.event.repository.fork == false) to the build job.
.github/workflows/preview-cleanup.yml Adds a conditional check (if: github.event.repository.fork == false) to the destroy job.

@reakaleek reakaleek enabled auto-merge (squash) March 17, 2025 23:35
@reakaleek reakaleek disabled auto-merge March 17, 2025 23:35
@reakaleek reakaleek requested a review from Mpdreamz March 18, 2025 10:03
@reakaleek reakaleek merged commit f4983fa into main Mar 18, 2025
10 checks passed
@reakaleek reakaleek deleted the feature/only-run-preview-workflows-on-non-forks branch March 18, 2025 10:57
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.

3 participants