Skip to content
Closed
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
6 changes: 5 additions & 1 deletion .github/workflows/changelog_generation.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
permissions:
contents: read

on:
pull_request:
types:
Expand All @@ -23,9 +26,10 @@ jobs:
github.event.sender.login == 'release-please[bot]' && github.head_ref == 'release-please--branches--main' &&
contains(github.event.pull_request.labels.*.name, 'autorelease: pending')
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
with:
ref: ${{ github.head_ref }}
persist-credentials: false
- name: Show status of the branch checked out
run: |
git status
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/changelog_generation_test.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
permissions:
contents: read

name: CHANGELOG.md generation test

on:
Expand All @@ -11,7 +14,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
with:
persist-credentials: false
- name: Unit Test
run: |
python3 .github/release-note-generation/unit_test.py
Expand Down
88 changes: 59 additions & 29 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
permissions:
contents: read

# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -32,7 +35,9 @@ jobs:
# runnable is true if there are changes outside the .github/workflows directory OR if ci.yaml itself (or kokoro scripts) is modified.
runnable: ${{ fromJSON(steps.filter.outputs.all_count) > fromJSON(steps.filter.outputs.workflows_count) || fromJSON(steps.filter.outputs.ci_count) > 0 }}
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
with:
persist-credentials: false
# Use this action, rather than a file filter so that we can make this
# mandatory.
# See https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax#example-including-branches
Expand Down Expand Up @@ -65,16 +70,18 @@ jobs:
id: date
if: ${{ needs.bulk-filter.outputs.runnable == 'true' }}
run: echo "::set-output name=week_of_year::$(date +'%W' --utc)"
- uses: actions/checkout@v4
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
if: ${{ needs.bulk-filter.outputs.runnable == 'true' }}
- uses: actions/setup-java@v4
with:
persist-credentials: false
- uses: actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4
if: ${{ needs.bulk-filter.outputs.runnable == 'true' }}
with:
distribution: temurin
java-version: ${{matrix.java}}
- run: java -version
if: ${{ needs.bulk-filter.outputs.runnable == 'true' }}
- uses: actions/cache@v4
- uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
id: mvn-cache
if: ${{ needs.bulk-filter.outputs.runnable == 'true' }}
with:
Expand All @@ -94,9 +101,11 @@ jobs:
id: date
if: ${{ needs.bulk-filter.outputs.runnable == 'true' }}
run: echo "::set-output name=week_of_year::$(date +'%W' --utc)"
- uses: actions/checkout@v4
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
if: ${{ needs.bulk-filter.outputs.runnable == 'true' }}
- uses: actions/setup-java@v4
with:
persist-credentials: false
- uses: actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4
if: ${{ needs.bulk-filter.outputs.runnable == 'true' }}
with:
java-version: 8
Expand All @@ -107,13 +116,13 @@ jobs:
if: ${{ needs.bulk-filter.outputs.runnable == 'true' }}
run: echo "SUREFIRE_JVM_OPT=-Djvm=${JAVA_HOME}/bin/java" >> $GITHUB_ENV
shell: bash
- uses: actions/setup-java@v4
- uses: actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4
if: ${{ needs.bulk-filter.outputs.runnable == 'true' }}
with:
java-version: 11
distribution: temurin
cache: maven
- uses: actions/cache@v4
- uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
id: mvn-cache
if: ${{ needs.bulk-filter.outputs.runnable == 'true' }}
with:
Expand All @@ -135,7 +144,9 @@ jobs:
outputs:
packages: ${{ steps.filter.outputs.changes }}
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
with:
persist-credentials: false
- uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4.0.1
id: filter
with:
Expand Down Expand Up @@ -233,8 +244,10 @@ jobs:
- name: Get current week within the year
id: date
run: echo "::set-output name=week_of_year::$(date +'%W' --utc)"
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
persist-credentials: false
- uses: actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4
with:
distribution: temurin
java-version: ${{matrix.java}}
Expand All @@ -256,14 +269,16 @@ jobs:
- name: Get current week within the year
id: date
run: echo "::set-output name=week_of_year::$(date +'%W' --utc)"
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
persist-credentials: false
- uses: actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4
with:
java-version: 11
distribution: temurin
cache: maven
- run: java -version
- uses: actions/cache@v4
- uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
id: mvn-cache
with:
path: ~/.m2/repository
Expand All @@ -274,7 +289,7 @@ jobs:
env:
BUILD_SUBDIR: ${{matrix.package}}
JOB_TYPE: install
- uses: actions/setup-java@v4
- uses: actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4
with:
java-version: ${{matrix.java}}
distribution: temurin
Expand All @@ -301,8 +316,10 @@ jobs:
matrix:
package: ${{ fromJSON(needs.changes.outputs.packages) }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
persist-credentials: false
- uses: actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4
with:
distribution: temurin
java-version: 11
Expand All @@ -318,8 +335,10 @@ jobs:
matrix:
package: ${{ fromJSON(needs.changes.outputs.packages) }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
persist-credentials: false
- uses: actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4
with:
distribution: temurin
java-version: 17
Expand All @@ -344,8 +363,10 @@ jobs:
steps:
- name: Support longpaths
run: git config --system core.longpaths true
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
persist-credentials: false
- uses: actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4
with:
distribution: temurin
java-version: 11
Expand All @@ -360,10 +381,11 @@ jobs:
if: ${{ needs.bulk-filter.outputs.runnable == 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
fetch-depth: 0
- uses: actions/setup-java@v4
persist-credentials: false
- uses: actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4
with:
distribution: temurin
java-version: 17
Expand All @@ -381,8 +403,10 @@ jobs:
- name: Get current week within the year
id: date
run: echo "::set-output name=week_of_year::$(date +'%W' --utc)"
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
persist-credentials: false
- uses: actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4
with:
distribution: temurin
java-version: 11
Expand All @@ -399,8 +423,10 @@ jobs:
if: ${{ needs.bulk-filter.outputs.runnable == 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
persist-credentials: false
- uses: actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4
with:
java-version: 11
distribution: temurin
Expand All @@ -410,17 +436,21 @@ jobs:
env:
JOB_TYPE: install
- name: Validate gapic-libraries-bom
uses: googleapis/java-cloud-bom/tests/validate-bom@v26.79.0
uses: googleapis/java-cloud-bom/tests/validate-bom@377c8d1fac6b1521dc52a10f4d02e5d371a0de67 # v26.79.0
with:
bom-path: gapic-libraries-bom/pom.xml
generation-config-check:
needs: bulk-filter
if: ${{ needs.bulk-filter.outputs.runnable == 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# zizmor: ignore[template-injection]
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
persist-credentials: false
- name: validate generation configuration
shell: bash
# zizmor: ignore[template-injection]
run: |
bash generation/run_generator_docker.sh "${library_generation_image_tag}" "${{ github.base_ref || 'main' }}" \
-e GENERATOR_VERSION="${library_generation_image_tag}" \
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/create_additional_release_tag.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
permissions:
contents: read

name: Create additional tags for each release

on:
Expand All @@ -13,9 +16,10 @@ jobs:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
token: ${{ secrets.CLOUD_JAVA_BOT_GITHUB_TOKEN }}
persist-credentials: false
- name: Set up Git
run: |
git config --local user.email "action@github.com"
Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/generate_new_client_hermetic_build.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
permissions:
contents: read

name: Generate new GAPIC client library (Hermetic Build)
on:
workflow_dispatch:
Expand Down Expand Up @@ -56,8 +59,10 @@ jobs:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
persist-credentials: false
- uses: actions/setup-python@7f4fc3e22c37d6ff65e88745f38bd3157c663f7c # v4
with:
python-version: '3.9'
cache: 'pip' # caching pip dependencies
Expand Down Expand Up @@ -90,7 +95,7 @@ jobs:
# create and push to branch in origin
# random_id allows multiple runs of this workflow
random_id=$(tr -dc A-Za-z0-9 </dev/urandom | head -c 5; echo)
branch_name="new-library/${{ github.event.inputs.api_shortname }}-${random_id}"
branch_name="new-library/${GITHUB_EVENT_INPUTS_API_SHORTNAME}-${random_id}"
git checkout -b "${branch_name}"
git add --all
commit_message="feat: [${API_SHORTNAME}] new module for ${API_SHORTNAME}"
Expand All @@ -115,3 +120,4 @@ jobs:
GENERATION_ARGUMENTS: ${{ steps.config_generation.outputs.new_library_args }}
DOCKER_VOLUMES: ${{ steps.generation.outputs.repo_volumes }}
GH_TOKEN: ${{ secrets.CLOUD_JAVA_BOT_GITHUB_TOKEN }}
GITHUB_EVENT_INPUTS_API_SHORTNAME: ${{ github.event.inputs.api_shortname }}
27 changes: 19 additions & 8 deletions .github/workflows/google-auth-library-java-ci.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
permissions:
contents: read

# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -27,7 +30,9 @@ jobs:
outputs:
library: ${{ steps.filter.outputs.library }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
persist-credentials: false
- uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4.0.1
id: filter
with:
Expand All @@ -44,8 +49,10 @@ jobs:
matrix:
java: [11, 17, 21, 25, 26]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
persist-credentials: false
- uses: actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4
with:
distribution: temurin
java-version: ${{matrix.java}}
Expand All @@ -60,8 +67,10 @@ jobs:
if: ${{ needs.filter.outputs.library == 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
with:
persist-credentials: false
- uses: actions/setup-java@17f84c3641ba7b8f6deff6309fc4c864478f5d62 # v3
with:
distribution: temurin
java-version: 11
Expand All @@ -75,8 +84,10 @@ jobs:
if: ${{ needs.filter.outputs.library == 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
persist-credentials: false
- uses: actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4
with:
distribution: temurin
java-version: 17
Expand All @@ -92,4 +103,4 @@ jobs:
if: ${{ contains(needs.*.result, 'failure') }}
run: exit 1
- name: Success otherwise
run: echo "Success!"
run: echo "Success!"
Loading
Loading