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
19 changes: 13 additions & 6 deletions .github/workflows/add_member.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,23 @@ on:
- opened
- reopened

permissions: {}

concurrency:
group: ${{ github.workflow }}-${{ github.event.issue.number }}
cancel-in-progress: false

jobs:
add-member:
if: contains(github.event.issue.labels.*.name, 'New member')
name: "Add new member"
runs-on: ubuntu-latest
environment: production
permissions:
id-token: write
contents: write
pull-requests: write
issues: write
id-token: write # Required for OIDC authentication
contents: write # Required to push the new member branch
pull-requests: write # Required to create a pull request
issues: write # Required to comment on the issue
env:
ISSUE_NUMBER: ${{ github.event.issue.number }}
ISSUE_USER: ${{ github.event.issue.user.login }}
Expand All @@ -24,7 +31,7 @@ jobs:

steps:
- name: Setup python
uses: actions/setup-python@v6
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: '3.12'

Expand All @@ -33,7 +40,7 @@ jobs:
with:
# This is the default, but it's required since we are performing
# Git operations later on.
persist-credentials: true
persist-credentials: true # zizmor: ignore[artipacked]

- name: Get username to add
id: get_username
Expand Down
15 changes: 11 additions & 4 deletions .github/workflows/member-verification.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,18 @@ on:
pull_request:
types: [opened]

permissions: {}

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true

jobs:
verify-new-member:
name: Verify new member
runs-on: ubuntu-latest
permissions:
pull-requests: write
pull-requests: write # Required to comment on and label pull requests
timeout-minutes: 3

steps:
Expand All @@ -19,7 +26,7 @@ jobs:

- name: Check PR title format
id: check-title
uses: actions/github-script@v8
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
with:
script: |
const title = context.payload.pull_request.title;
Expand All @@ -32,7 +39,7 @@ jobs:
- name: Check user account age
if: steps.check-title.outputs.result == 'continue'
id: check-user
uses: actions/github-script@v8
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
MIN_ACCOUNT_AGE_MONTHS: ${{ vars.MIN_ACCOUNT_AGE_MONTHS || '3' }} # Default to 3 months if not set
with:
Expand Down Expand Up @@ -80,7 +87,7 @@ jobs:

- name: Add label if new account
if: steps.check-user.outputs.result == 'new-account' && steps.check-title.outputs.result == 'continue'
uses: actions/github-script@v8
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
with:
script: |
await github.rest.issues.addLabels({
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/members-apply.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,20 @@ on:
- '.github/workflows/members-apply.yml'
- '.github/workflows/members-plan.yml'

permissions: {}

concurrency:
group: terraform-actions-members

jobs:
org-apply-changes:
name: "Apply org membership changes"
runs-on: ubuntu-latest
environment: production

permissions:
contents: read
pull-requests: write
pull-requests: write # Required to post terraform plan comments
timeout-minutes: 10
steps:
- name: Checkout code
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/members-plan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ on:
- '.github/workflows/members-apply.yml'
# Do not trigger the plan action when it's been changed since this action has write permissions

permissions: {}

concurrency:
group: terraform-actions-members

Expand All @@ -18,7 +20,7 @@ jobs:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
pull-requests: write # Required to post terraform fmt check comments
timeout-minutes: 4
steps:
- name: Checkout code
Expand All @@ -35,8 +37,9 @@ jobs:
name: "Plan org membership changes and list them in a PR"
runs-on: ubuntu-latest
needs: ["format-terraform-code"]
environment: production
permissions:
pull-requests: write
pull-requests: write # Required to post terraform plan comments
contents: read
timeout-minutes: 10
steps:
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/repos-apply.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,20 @@ on:
- '.github/workflows/repos-apply.yml'
- '.github/workflows/repos-plan.yml'

permissions: {}

concurrency:
group: terraform-actions-repos

jobs:
repos-apply-changes:
name: "Apply org-repositories changes"
runs-on: ubuntu-latest
environment: production

permissions:
contents: read
pull-requests: write
pull-requests: write # Required to post terraform plan comments
timeout-minutes: 10
steps:
- name: Checkout code
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/repos-plan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ on:
- '.github/workflows/repos-apply.yml'
# Do not trigger the plan action when it's been changed since this action has write permissions

permissions: {}

concurrency:
group: terraform-actions-repos

Expand All @@ -18,7 +20,7 @@ jobs:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
pull-requests: write # Required to post terraform fmt check comments
timeout-minutes: 4
steps:
- name: Checkout code
Expand All @@ -35,8 +37,9 @@ jobs:
name: "Plan org-repositories changes and list them in a PR"
runs-on: ubuntu-latest
needs: ["format-terraform-code"]
environment: production
permissions:
pull-requests: write
pull-requests: write # Required to post terraform plan comments
contents: read
timeout-minutes: 10
steps:
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/zizmor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,16 @@ on:

permissions: {}

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

jobs:
zizmor:
name: Run zizmor 🌈
runs-on: ubuntu-latest
permissions:
security-events: write
security-events: write # Required to upload SARIF results to GitHub Security
contents: read # only needed for private repos
actions: read # only needed for private repos
timeout-minutes: 3
Expand Down