From 4a4506632046be9873862e3cbad32c107a5295bb Mon Sep 17 00:00:00 2001 From: Vitor Mattos Date: Sun, 20 Sep 2026 20:47:14 -0300 Subject: [PATCH] chore: remove temporary environment bootstrap Signed-off-by: Vitor Mattos --- .github/workflows/bootstrap-environments.yml | 88 -------------------- 1 file changed, 88 deletions(-) delete mode 100644 .github/workflows/bootstrap-environments.yml diff --git a/.github/workflows/bootstrap-environments.yml b/.github/workflows/bootstrap-environments.yml deleted file mode 100644 index 1faf35d..0000000 --- a/.github/workflows/bootstrap-environments.yml +++ /dev/null @@ -1,88 +0,0 @@ -# SPDX-FileCopyrightText: 2026 LibreCode coop and contributors -# SPDX-License-Identifier: AGPL-3.0-or-later - -name: Bootstrap privileged environments - -on: - push: - branches: - - main - paths: - - '.github/workflows/bootstrap-environments.yml' - workflow_dispatch: - -permissions: - contents: read - -jobs: - configure: - name: Configure privileged environments - if: github.ref == 'refs/heads/main' - runs-on: ubuntu-latest - environment: ruleset-sync - timeout-minutes: 10 - - steps: - - name: Authenticate for LibreCodeCoop/.github - id: org-config-token - uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0 - with: - client-id: ${{ vars.RULESET_APP_CLIENT_ID }} - private-key: ${{ secrets.RULESET_APP_PRIVATE_KEY }} - owner: LibreCodeCoop - repositories: .github - permission-administration: write - - - name: Authenticate for github-governance - id: governance-token - uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0 - with: - client-id: ${{ vars.RULESET_APP_CLIENT_ID }} - private-key: ${{ secrets.RULESET_APP_PRIVATE_KEY }} - owner: LibreCodeCoop - repositories: github-governance - permission-administration: write - - - name: Protect ruleset-sync environment - env: - GH_TOKEN: ${{ steps.org-config-token.outputs.token }} - run: | - set -euo pipefail - gh api --method PUT -H 'Accept: application/vnd.github+json' -H 'X-GitHub-Api-Version: 2026-03-10' repos/LibreCodeCoop/.github/environments/ruleset-sync --input - <<'JSON' - { - "wait_timer": 0, - "prevent_self_review": false, - "reviewers": [{"type": "User", "id": 1079143}], - "deployment_branch_policy": { - "protected_branches": false, - "custom_branch_policies": true - } - } - JSON - - policies="$(gh api -H 'Accept: application/vnd.github+json' -H 'X-GitHub-Api-Version: 2026-03-10' repos/LibreCodeCoop/.github/environments/ruleset-sync/deployment-branch-policies)" - if ! jq -e '.branch_policies | any(.name == "main")' <<< "$policies" >/dev/null; then - gh api --method POST -H 'Accept: application/vnd.github+json' -H 'X-GitHub-Api-Version: 2026-03-10' repos/LibreCodeCoop/.github/environments/ruleset-sync/deployment-branch-policies -f name=main -f type=branch - fi - - - name: Protect release environment - env: - GH_TOKEN: ${{ steps.governance-token.outputs.token }} - run: | - set -euo pipefail - gh api --method PUT -H 'Accept: application/vnd.github+json' -H 'X-GitHub-Api-Version: 2026-03-10' repos/LibreCodeCoop/github-governance/environments/release --input - <<'JSON' - { - "wait_timer": 0, - "prevent_self_review": false, - "reviewers": [{"type": "User", "id": 1079143}], - "deployment_branch_policy": { - "protected_branches": false, - "custom_branch_policies": true - } - } - JSON - - policies="$(gh api -H 'Accept: application/vnd.github+json' -H 'X-GitHub-Api-Version: 2026-03-10' repos/LibreCodeCoop/github-governance/environments/release/deployment-branch-policies)" - if ! jq -e '.branch_policies | any(.name == "main")' <<< "$policies" >/dev/null; then - gh api --method POST -H 'Accept: application/vnd.github+json' -H 'X-GitHub-Api-Version: 2026-03-10' repos/LibreCodeCoop/github-governance/environments/release/deployment-branch-policies -f name=main -f type=branch - fi