diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 07449d13f..51c2e44ba 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,3 +1,17 @@ +# Copyright 2025 "Google LLC" +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + version: 2 updates: - package-ecosystem: "gomod" diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 99c27d779..cedcdaa5e 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -1,14 +1,17 @@ -# For most projects, this workflow file will not need changing; you simply need -# to commit it to your repository. +# Copyright 2025 "Google LLC" # -# You may wish to alter this file to override the set of languages analyzed, -# or to provide custom queries or build logic. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at # -# ******** NOTE ******** -# We have attempted to detect the languages in your repository. Please check -# the `language` matrix defined below to confirm you have the correct set of -# supported CodeQL languages. +# http://www.apache.org/licenses/LICENSE-2.0 # +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + name: "CodeQL" on: diff --git a/.github/workflows/multi-approvers.yml b/.github/workflows/multi-approvers.yml new file mode 100644 index 000000000..e47313116 --- /dev/null +++ b/.github/workflows/multi-approvers.yml @@ -0,0 +1,76 @@ +# Copyright 2025 "Google LLC" +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: 'multi-approvers' + +on: + pull_request: + types: + - 'opened' + - 'edited' + - 'reopened' + - 'synchronize' + - 'ready_for_review' + - 'review_requested' + - 'review_request_removed' + pull_request_review: + types: + - 'submitted' + - 'dismissed' + +permissions: + actions: 'write' + contents: 'read' + id-token: 'write' + pull-requests: 'read' + +concurrency: + group: '${{ github.workflow }}-${{ github.head_ref || github.ref }}' + cancel-in-progress: true + +jobs: + multi-approvers: + runs-on: 'ubuntu-latest' + steps: + - name: 'Authenticate to Google Cloud' + id: 'minty-auth' + uses: 'google-github-actions/auth@6fc4af4b145ae7821d527454aa9bd537d1f2dc5f' # ratchet:google-github-actions/auth@v2 + with: + create_credentials_file: false + export_environment_variables: false + workload_identity_provider: '${{ vars.TOKEN_MINTER_WIF_PROVIDER }}' + service_account: '${{ vars.TOKEN_MINTER_WIF_SERVICE_ACCOUNT }}' + token_format: 'id_token' + id_token_audience: '${{ vars.TOKEN_MINTER_SERVICE_AUDIENCE }}' + id_token_include_email: true + - name: 'Mint Token' + id: 'minty' + uses: 'abcxyz/github-token-minter/.github/actions/minty@main' # ratchet:exclude + with: + id_token: '${{ steps.minty-auth.outputs.id_token }}' + service_url: '${{ vars.TOKEN_MINTER_SERVICE_URL }}' + requested_permissions: |- + { + "repositories": ["${{ github.event.repository.name }}"], + "permissions": { + "actions": "write", + "members": "read", + "pull_requests": "read" + } + } + - name: 'Multi-approvers' + uses: 'abcxyz/actions/.github/actions/multi-approvers@main' + with: + team: 'osconfig-admin-team' + token: '${{ secrets.MULTI_APPROVERS_TOKEN }}'