Skip to content

Commit 9b0b111

Browse files
authored
Merge pull request #29 from FilOzone/master-upgrade
upgrade@20044536817
2 parents 79abf6b + 9492ca0 commit 9b0b111

File tree

15 files changed

+2319
-55
lines changed

15 files changed

+2319
-55
lines changed

.github/workflows/apply.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,20 @@ jobs:
2323
shell: bash
2424
steps:
2525
- name: Checkout
26-
uses: actions/checkout@v4
26+
uses: actions/checkout@v5
2727
- name: Discover workspaces
2828
id: workspaces
2929
run: echo "this=$(ls github | jq --raw-input '[.[0:-4]]' | jq -sc add)" >> $GITHUB_OUTPUT
30-
- run: npm ci && npm run build
30+
- name: Install pnpm
31+
uses: pnpm/action-setup@v4
32+
with:
33+
version: 10
34+
- name: Use Node.js lts/*
35+
uses: actions/setup-node@v6
36+
with:
37+
node-version: lts/*
38+
cache: ''
39+
- run: pnpm install --frozen-lockfile && pnpm run build
3140
working-directory: scripts
3241
- name: Find sha for plan
3342
id: sha
@@ -65,7 +74,7 @@ jobs:
6574
working-directory: terraform
6675
steps:
6776
- name: Checkout
68-
uses: actions/checkout@v4
77+
uses: actions/checkout@v5
6978
- name: Setup terraform
7079
uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd # v3.1.2
7180
with:

.github/workflows/clean.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
shell: bash
3131
steps:
3232
- name: Checkout
33-
uses: actions/checkout@v4
33+
uses: actions/checkout@v5
3434
- name: Discover workspaces
3535
id: workspaces
3636
env:
@@ -69,7 +69,7 @@ jobs:
6969
shell: bash
7070
steps:
7171
- name: Checkout
72-
uses: actions/checkout@v4
72+
uses: actions/checkout@v5
7373
- name: Setup terraform
7474
uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd # v3.1.2
7575
with:

.github/workflows/cleanup.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,18 @@ jobs:
3737
TF_WORKSPACE: ${{ github.repository_owner }}
3838
steps:
3939
- name: Checkout
40-
uses: actions/checkout@v4
40+
uses: actions/checkout@v5
41+
- name: Install pnpm
42+
uses: pnpm/action-setup@v4
43+
with:
44+
version: 10
45+
- name: Use Node.js lts/*
46+
uses: actions/setup-node@v6
47+
with:
48+
node-version: lts/*
49+
cache: ''
4150
- name: Initialize scripts
42-
run: npm install && npm run build
51+
run: pnpm install --frozen-lockfile && pnpm run build
4352
working-directory: scripts
4453
- name: Remove inactive members
4554
run: node lib/actions/remove-inactive-members.js

.github/workflows/fix.yml

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
skip-fix: ${{ steps.skip-fix.outputs.this }}
3636
steps:
3737
- name: Checkout
38-
uses: actions/checkout@v4
38+
uses: actions/checkout@v5
3939
- if: github.event_name == 'pull_request_target'
4040
env:
4141
NUMBER: ${{ github.event.pull_request.number }}
@@ -82,7 +82,7 @@ jobs:
8282
TF_VAR_write_delay_ms: 300
8383
steps:
8484
- name: Checkout
85-
uses: actions/checkout@v4
85+
uses: actions/checkout@v5
8686
- if: github.event_name == 'pull_request_target'
8787
env:
8888
NUMBER: ${{ github.event.pull_request.number }}
@@ -100,8 +100,17 @@ jobs:
100100
- name: Initialize terraform
101101
run: terraform init
102102
working-directory: terraform
103+
- name: Install pnpm
104+
uses: pnpm/action-setup@v4
105+
with:
106+
version: 10
107+
- name: Use Node.js lts/*
108+
uses: actions/setup-node@v6
109+
with:
110+
node-version: lts/*
111+
cache: ''
103112
- name: Initialize scripts
104-
run: npm ci && npm run build
113+
run: pnpm install --frozen-lockfile && pnpm run build
105114
working-directory: scripts
106115
- name: Fix
107116
id: fix
@@ -117,7 +126,7 @@ jobs:
117126
# NOTE(galargh, 2024-02-15): This will only work if GitHub as Code is used for a single organization
118127
- name: Comment on pull request
119128
if: github.event_name == 'pull_request_target' && steps.fix.outputs.comment
120-
uses: marocchino/sticky-pull-request-comment@67d0dec7b07ed060a405f9b2a64b8ab319fdd7db # v2.9.2
129+
uses: marocchino/sticky-pull-request-comment@773744901bac0e8cbb5a0dc842800d45e9b2b405 # v2.9.4
121130
with:
122131
header: fix
123132
number: ${{ github.event.pull_request.number }}
@@ -142,22 +151,24 @@ jobs:
142151
installation_retrieval_payload: ${{ secrets[format('RW_GITHUB_APP_INSTALLATION_ID_{0}', github.repository_owner)] || secrets.RW_GITHUB_APP_INSTALLATION_ID }}
143152
private_key: ${{ secrets.RW_GITHUB_APP_PEM_FILE }}
144153
- name: Checkout
145-
uses: actions/checkout@v4
154+
uses: actions/checkout@v5
146155
with:
147156
repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }}
148157
ref: ${{ github.event.pull_request.head.sha || github.sha }}
149158
token: ${{ steps.token.outputs.token }}
150159
path: head
151160
- name: Checkout
152-
uses: actions/checkout@v4
161+
uses: actions/checkout@v5
153162
with:
154163
path: base
155164
- name: Download YAML configs
156-
uses: actions/download-artifact@v4
165+
uses: actions/download-artifact@v5
157166
with:
158167
path: artifacts
159168
- name: Copy YAML configs
160-
run: cp artifacts/**/*.yml head/github
169+
run: |
170+
shopt -s globstar
171+
cp artifacts/**/*.yml head/github
161172
- name: Check if github was modified
162173
id: github-modified
163174
run: |

.github/workflows/labels.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,18 @@ jobs:
3535
TF_WORKSPACE: ${{ github.repository_owner }}
3636
steps:
3737
- name: Checkout
38-
uses: actions/checkout@v4
38+
uses: actions/checkout@v5
39+
- name: Install pnpm
40+
uses: pnpm/action-setup@v4
41+
with:
42+
version: 10
43+
- name: Use Node.js lts/*
44+
uses: actions/setup-node@v6
45+
with:
46+
node-version: lts/*
47+
cache: ''
3948
- name: Initialize scripts
40-
run: npm install && npm run build
49+
run: pnpm install --frozen-lockfile && pnpm run build
4150
working-directory: scripts
4251
- name: Sync
4352
run: node lib/actions/sync-labels.js

.github/workflows/plan.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
workspaces: ${{ steps.workspaces.outputs.this }}
2626
steps:
2727
- name: Checkout
28-
uses: actions/checkout@v4
28+
uses: actions/checkout@v5
2929
- if: github.event_name == 'pull_request_target'
3030
env:
3131
NUMBER: ${{ github.event.pull_request.number }}
@@ -70,7 +70,7 @@ jobs:
7070
TF_VAR_write_delay_ms: 300
7171
steps:
7272
- name: Checkout
73-
uses: actions/checkout@v4
73+
uses: actions/checkout@v5
7474
- if: github.event_name == 'pull_request_target'
7575
env:
7676
NUMBER: ${{ github.event.pull_request.number }}
@@ -112,7 +112,7 @@ jobs:
112112
AWS_SECRET_ACCESS_KEY: ${{ secrets.RO_AWS_SECRET_ACCESS_KEY }}
113113
steps:
114114
- name: Checkout
115-
uses: actions/checkout@v4
115+
uses: actions/checkout@v5
116116
- if: github.event_name == 'pull_request_target'
117117
env:
118118
NUMBER: ${{ github.event.pull_request.number }}
@@ -130,7 +130,7 @@ jobs:
130130
run: terraform init
131131
working-directory: terraform
132132
- name: Download terraform plans
133-
uses: actions/download-artifact@v4
133+
uses: actions/download-artifact@v5
134134
with:
135135
path: terraform
136136
- name: Show terraform plans
@@ -157,7 +157,7 @@ jobs:
157157
echo 'EOF' >> $GITHUB_ENV
158158
working-directory: terraform
159159
- name: Comment on pull request
160-
uses: marocchino/sticky-pull-request-comment@67d0dec7b07ed060a405f9b2a64b8ab319fdd7db # v2.9.2
160+
uses: marocchino/sticky-pull-request-comment@773744901bac0e8cbb5a0dc842800d45e9b2b405 # v2.9.4
161161
with:
162162
header: plan
163163
number: ${{ github.event.pull_request.number }}

.github/workflows/sync.yml

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ on:
1212
description: Whether to acquire terraform state lock during sync
1313
required: false
1414
default: "true"
15+
refresh:
16+
description: Refresh terraform state before sync
17+
required: false
18+
default: "false"
1519

1620
jobs:
1721
prepare:
@@ -24,7 +28,7 @@ jobs:
2428
shell: bash
2529
steps:
2630
- name: Checkout
27-
uses: actions/checkout@v4
31+
uses: actions/checkout@v5
2832
- name: Discover workspaces
2933
id: workspaces
3034
env:
@@ -63,7 +67,7 @@ jobs:
6367
shell: bash
6468
steps:
6569
- name: Checkout
66-
uses: actions/checkout@v4
70+
uses: actions/checkout@v5
6771
- name: Setup terraform
6872
uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd # v3.1.2
6973
with:
@@ -77,15 +81,30 @@ jobs:
7781
terraform workspace select "${TF_WORKSPACE_OPT}" || terraform workspace new "${TF_WORKSPACE_OPT}"
7882
echo "TF_WORKSPACE=${TF_WORKSPACE_OPT}" >> $GITHUB_ENV
7983
working-directory: terraform
84+
- name: Refresh terraform state
85+
if: ${{ github.event.inputs.refresh == 'true' }}
86+
run: |
87+
echo "{}" > $TF_WORKSPACE.tfstate.json
88+
terraform apply -refresh-only -auto-approve -lock=$TF_LOCK
89+
working-directory: terraform
8090
- name: Pull terraform state
8191
run: |
8292
terraform show -json > $TF_WORKSPACE.tfstate.json
8393
working-directory: terraform
94+
- name: Install pnpm
95+
uses: pnpm/action-setup@v4
96+
with:
97+
version: 10
98+
- name: Use Node.js lts/*
99+
uses: actions/setup-node@v6
100+
with:
101+
node-version: lts/*
102+
cache: ''
84103
- name: Sync
85104
run: |
86-
npm ci
87-
npm run build
88-
npm run main
105+
pnpm install --frozen-lockfile
106+
pnpm run build
107+
pnpm run main
89108
working-directory: scripts
90109
- uses: ./.github/actions/git-config-user
91110
- env:
@@ -114,7 +133,7 @@ jobs:
114133
installation_retrieval_payload: ${{ secrets[format('RW_GITHUB_APP_INSTALLATION_ID_{0}', github.repository_owner)] || secrets.RW_GITHUB_APP_INSTALLATION_ID }}
115134
private_key: ${{ secrets.RW_GITHUB_APP_PEM_FILE }}
116135
- name: Checkout
117-
uses: actions/checkout@v4
136+
uses: actions/checkout@v5
118137
with:
119138
token: ${{ steps.token.outputs.token }}
120139
- uses: ./.github/actions/git-config-user

.github/workflows/update.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,17 @@ jobs:
2020
run:
2121
shell: bash
2222
steps:
23-
- uses: actions/checkout@v4
24-
- run: npm ci && npm run build
23+
- uses: actions/checkout@v5
24+
- name: Install pnpm
25+
uses: pnpm/action-setup@v4
26+
with:
27+
version: 10
28+
- name: Use Node.js lts/*
29+
uses: actions/setup-node@v6
30+
with:
31+
node-version: lts/*
32+
cache: ''
33+
- run: pnpm install --frozen-lockfile && pnpm run build
2534
working-directory: scripts
2635
- name: Update PRs
2736
env:

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
4949
- tf: to prevent destroy of membership and repository resources
5050
- apply: find sha for plan using proper credentials
5151
- updated upload and download artifacts actions to v4
52+
- switched from npm to pnpm
5253

5354
### Fixed
55+
- include labels in the config resources only if they are explicitly defined in the config
5456
- always assert state type when creating resources from state
5557
- do not break long file content lines
5658
- source TF_WORKING_DIR from env helper instead of process.env in locals helper

github/FilOzone.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -244,8 +244,8 @@ repositories:
244244
has_discussions: false
245245
merge_commit_message: PR_TITLE
246246
merge_commit_title: MERGE_MESSAGE
247-
secret_scanning_push_protection: false
248-
secret_scanning: false
247+
secret_scanning_push_protection: true
248+
secret_scanning: true
249249
squash_merge_commit_message: COMMIT_MESSAGES
250250
squash_merge_commit_title: COMMIT_OR_PR_TITLE
251251
teams:
@@ -337,8 +337,8 @@ repositories:
337337
has_discussions: false
338338
merge_commit_message: PR_TITLE
339339
merge_commit_title: MERGE_MESSAGE
340-
secret_scanning_push_protection: false
341-
secret_scanning: false
340+
secret_scanning_push_protection: true
341+
secret_scanning: true
342342
squash_merge_commit_message: COMMIT_MESSAGES
343343
squash_merge_commit_title: COMMIT_OR_PR_TITLE
344344
visibility: public

0 commit comments

Comments
 (0)