Skip to content

Commit

Permalink
Revert "Support building from forks (#299)"
Browse files Browse the repository at this point in the history
This reverts commit 64597eb.
  • Loading branch information
gastaldi committed Oct 23, 2024
1 parent 64597eb commit 93cc8a8
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 28 deletions.
21 changes: 0 additions & 21 deletions .github/workflows/check.yml

This file was deleted.

31 changes: 25 additions & 6 deletions .github/workflows/terraform.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,37 @@
name: "Terraform"

on:
workflow_run:
workflows: [ "Check Terraform Scripts" ]
types:
- completed

pull_request:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
terraform_only_check:
if: github.repository_owner == 'quarkiverse'
name: Check for Terraform Scripts only change
outputs:
tf_only: ${{ steps.files.outputs.any_changed == 'true' || steps.files.outputs.any_deleted == 'true' }}
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4

- id: files
name: Get changed files
uses: tj-actions/changed-files@v42
with:
files: terraform-scripts/**

terraform:
name: "Terraform"
runs-on: ubuntu-latest
if: (github.repository_owner == 'quarkiverse')
if: (github.repository_owner == 'quarkiverse') && (needs.terraform_only_check.outputs.tf_only == 'true')
needs:
- terraform_only_check
defaults:
run:
working-directory: ./terraform-scripts
Expand Down Expand Up @@ -43,13 +60,15 @@ jobs:

- name: Terraform Plan
id: plan
if: github.event_name == 'pull_request'
run: |
echo 'PLAN_RESULTS<<EOF' >> $GITHUB_ENV
terraform plan -no-color | grep -v "Refreshing state...\|Reading...\|Read complete after" >> $GITHUB_ENV
echo 'EOF' >> $GITHUB_ENV
continue-on-error: true

- uses: actions/github-script@v7
if: github.event_name == 'pull_request'
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
Expand Down
2 changes: 1 addition & 1 deletion terraform-scripts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ IMPORTANT: Because the VCS is the single source of truth, you can't apply terraf

New repositories are submitted via Pull Requests to the root directory in this repository.

IMPORTANT: `@quarkiverse/quarkiverse-members` should be able to create new branches here. Non-members need to fork the repository and submit a PR from the fork.
IMPORTANT: The branch must be created in the same repository, it won't work in a separate fork (`@quarkiverse/quarkiverse-members` should be able to create new branches here)

1. Add a new `.tf` script in the `terraform-scripts/` directory with the following structure:

Expand Down

0 comments on commit 93cc8a8

Please sign in to comment.