Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions .github/workflows/apply.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,20 @@ jobs:
shell: bash
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Discover workspaces
id: workspaces
run: echo "this=$(ls github | jq --raw-input '[.[0:-4]]' | jq -sc add)" >> $GITHUB_OUTPUT
- run: npm ci && npm run build
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10
- name: Use Node.js lts/*
uses: actions/setup-node@v6
with:
node-version: lts/*
cache: ''
- run: pnpm install --frozen-lockfile && pnpm run build
working-directory: scripts
- name: Find sha for plan
id: sha
Expand Down Expand Up @@ -65,7 +74,7 @@ jobs:
working-directory: terraform
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Setup terraform
uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd # v3.1.2
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/clean.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
shell: bash
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Discover workspaces
id: workspaces
env:
Expand Down Expand Up @@ -69,7 +69,7 @@ jobs:
shell: bash
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Setup terraform
uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd # v3.1.2
with:
Expand Down
13 changes: 11 additions & 2 deletions .github/workflows/cleanup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,18 @@ jobs:
TF_WORKSPACE: ${{ github.repository_owner }}
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10
- name: Use Node.js lts/*
uses: actions/setup-node@v6
with:
node-version: lts/*
cache: ''
- name: Initialize scripts
run: npm install && npm run build
run: pnpm install --frozen-lockfile && pnpm run build
working-directory: scripts
- name: Remove inactive members
run: node lib/actions/remove-inactive-members.js
Expand Down
27 changes: 19 additions & 8 deletions .github/workflows/fix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
skip-fix: ${{ steps.skip-fix.outputs.this }}
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
- if: github.event_name == 'pull_request_target'
env:
NUMBER: ${{ github.event.pull_request.number }}
Expand Down Expand Up @@ -82,7 +82,7 @@ jobs:
TF_VAR_write_delay_ms: 300
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
- if: github.event_name == 'pull_request_target'
env:
NUMBER: ${{ github.event.pull_request.number }}
Expand All @@ -100,8 +100,17 @@ jobs:
- name: Initialize terraform
run: terraform init
working-directory: terraform
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10
- name: Use Node.js lts/*
uses: actions/setup-node@v6
with:
node-version: lts/*
cache: ''
- name: Initialize scripts
run: npm ci && npm run build
run: pnpm install --frozen-lockfile && pnpm run build
working-directory: scripts
- name: Fix
id: fix
Expand All @@ -117,7 +126,7 @@ jobs:
# NOTE(galargh, 2024-02-15): This will only work if GitHub as Code is used for a single organization
- name: Comment on pull request
if: github.event_name == 'pull_request_target' && steps.fix.outputs.comment
uses: marocchino/sticky-pull-request-comment@67d0dec7b07ed060a405f9b2a64b8ab319fdd7db # v2.9.2
uses: marocchino/sticky-pull-request-comment@773744901bac0e8cbb5a0dc842800d45e9b2b405 # v2.9.4
with:
header: fix
number: ${{ github.event.pull_request.number }}
Expand All @@ -142,22 +151,24 @@ jobs:
installation_retrieval_payload: ${{ secrets[format('RW_GITHUB_APP_INSTALLATION_ID_{0}', github.repository_owner)] || secrets.RW_GITHUB_APP_INSTALLATION_ID }}
private_key: ${{ secrets.RW_GITHUB_APP_PEM_FILE }}
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }}
ref: ${{ github.event.pull_request.head.sha || github.sha }}
token: ${{ steps.token.outputs.token }}
path: head
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
path: base
- name: Download YAML configs
uses: actions/download-artifact@v4
uses: actions/download-artifact@v5
with:
path: artifacts
- name: Copy YAML configs
run: cp artifacts/**/*.yml head/github
run: |
shopt -s globstar
cp artifacts/**/*.yml head/github
- name: Check if github was modified
id: github-modified
run: |
Expand Down
13 changes: 11 additions & 2 deletions .github/workflows/labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,18 @@ jobs:
TF_WORKSPACE: ${{ github.repository_owner }}
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10
- name: Use Node.js lts/*
uses: actions/setup-node@v6
with:
node-version: lts/*
cache: ''
- name: Initialize scripts
run: npm install && npm run build
run: pnpm install --frozen-lockfile && pnpm run build
working-directory: scripts
- name: Sync
run: node lib/actions/sync-labels.js
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/plan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
workspaces: ${{ steps.workspaces.outputs.this }}
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
- if: github.event_name == 'pull_request_target'
env:
NUMBER: ${{ github.event.pull_request.number }}
Expand Down Expand Up @@ -70,7 +70,7 @@ jobs:
TF_VAR_write_delay_ms: 300
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
- if: github.event_name == 'pull_request_target'
env:
NUMBER: ${{ github.event.pull_request.number }}
Expand Down Expand Up @@ -112,7 +112,7 @@ jobs:
AWS_SECRET_ACCESS_KEY: ${{ secrets.RO_AWS_SECRET_ACCESS_KEY }}
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
- if: github.event_name == 'pull_request_target'
env:
NUMBER: ${{ github.event.pull_request.number }}
Expand All @@ -130,7 +130,7 @@ jobs:
run: terraform init
working-directory: terraform
- name: Download terraform plans
uses: actions/download-artifact@v4
uses: actions/download-artifact@v5
with:
path: terraform
- name: Show terraform plans
Expand All @@ -157,7 +157,7 @@ jobs:
echo 'EOF' >> $GITHUB_ENV
working-directory: terraform
- name: Comment on pull request
uses: marocchino/sticky-pull-request-comment@67d0dec7b07ed060a405f9b2a64b8ab319fdd7db # v2.9.2
uses: marocchino/sticky-pull-request-comment@773744901bac0e8cbb5a0dc842800d45e9b2b405 # v2.9.4
with:
header: plan
number: ${{ github.event.pull_request.number }}
Expand Down
31 changes: 25 additions & 6 deletions .github/workflows/sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ on:
description: Whether to acquire terraform state lock during sync
required: false
default: "true"
refresh:
description: Refresh terraform state before sync
required: false
default: "false"

jobs:
prepare:
Expand All @@ -24,7 +28,7 @@ jobs:
shell: bash
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Discover workspaces
id: workspaces
env:
Expand Down Expand Up @@ -63,7 +67,7 @@ jobs:
shell: bash
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Setup terraform
uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd # v3.1.2
with:
Expand All @@ -77,15 +81,30 @@ jobs:
terraform workspace select "${TF_WORKSPACE_OPT}" || terraform workspace new "${TF_WORKSPACE_OPT}"
echo "TF_WORKSPACE=${TF_WORKSPACE_OPT}" >> $GITHUB_ENV
working-directory: terraform
- name: Refresh terraform state
if: ${{ github.event.inputs.refresh == 'true' }}
run: |
echo "{}" > $TF_WORKSPACE.tfstate.json
terraform apply -refresh-only -auto-approve -lock=$TF_LOCK
working-directory: terraform
- name: Pull terraform state
run: |
terraform show -json > $TF_WORKSPACE.tfstate.json
working-directory: terraform
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10
- name: Use Node.js lts/*
uses: actions/setup-node@v6
with:
node-version: lts/*
cache: ''
- name: Sync
run: |
npm ci
npm run build
npm run main
pnpm install --frozen-lockfile
pnpm run build
pnpm run main
working-directory: scripts
- uses: ./.github/actions/git-config-user
- env:
Expand Down Expand Up @@ -114,7 +133,7 @@ jobs:
installation_retrieval_payload: ${{ secrets[format('RW_GITHUB_APP_INSTALLATION_ID_{0}', github.repository_owner)] || secrets.RW_GITHUB_APP_INSTALLATION_ID }}
private_key: ${{ secrets.RW_GITHUB_APP_PEM_FILE }}
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
token: ${{ steps.token.outputs.token }}
- uses: ./.github/actions/git-config-user
Expand Down
13 changes: 11 additions & 2 deletions .github/workflows/update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,17 @@ jobs:
run:
shell: bash
steps:
- uses: actions/checkout@v4
- run: npm ci && npm run build
- uses: actions/checkout@v5
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10
- name: Use Node.js lts/*
uses: actions/setup-node@v6
with:
node-version: lts/*
cache: ''
- run: pnpm install --frozen-lockfile && pnpm run build
working-directory: scripts
- name: Update PRs
env:
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- tf: to prevent destroy of membership and repository resources
- apply: find sha for plan using proper credentials
- updated upload and download artifacts actions to v4
- switched from npm to pnpm

### Fixed
- include labels in the config resources only if they are explicitly defined in the config
- always assert state type when creating resources from state
- do not break long file content lines
- source TF_WORKING_DIR from env helper instead of process.env in locals helper
Expand Down
8 changes: 4 additions & 4 deletions github/FilOzone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,8 @@ repositories:
has_discussions: false
merge_commit_message: PR_TITLE
merge_commit_title: MERGE_MESSAGE
secret_scanning_push_protection: false
secret_scanning: false
secret_scanning_push_protection: true
secret_scanning: true
squash_merge_commit_message: COMMIT_MESSAGES
squash_merge_commit_title: COMMIT_OR_PR_TITLE
teams:
Expand Down Expand Up @@ -337,8 +337,8 @@ repositories:
has_discussions: false
merge_commit_message: PR_TITLE
merge_commit_title: MERGE_MESSAGE
secret_scanning_push_protection: false
secret_scanning: false
secret_scanning_push_protection: true
secret_scanning: true
squash_merge_commit_message: COMMIT_MESSAGES
squash_merge_commit_title: COMMIT_OR_PR_TITLE
visibility: public
Expand Down
Loading