Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: use composite action #1728

Merged
merged 3 commits into from
Sep 26, 2024
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
117 changes: 0 additions & 117 deletions .github/scripts/hermetic_library_generation.sh

This file was deleted.

31 changes: 18 additions & 13 deletions .github/workflows/hermetic_library_generation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,29 @@ name: Hermetic library generation upon generation config change through pull req
on:
pull_request:

env:
REPO_FULL_NAME: ${{ github.event.pull_request.head.repo.full_name }}
GITHUB_REPOSITORY: ${{ github.repository }}
jobs:
library_generation:
# skip pull requests coming from a forked repository
if: github.event.pull_request.head.repo.full_name == github.repository
runs-on: ubuntu-latest
steps:
- name: Determine whether the pull request comes from a fork
run: |
if [[ "${GITHUB_REPOSITORY}" != "${REPO_FULL_NAME}" ]]; then
echo "This PR comes from a fork. Skip library generation."
echo "SHOULD_RUN=false" >> $GITHUB_ENV
else
echo "SHOULD_RUN=true" >> $GITHUB_ENV
fi
- uses: actions/checkout@v4
if: env.SHOULD_RUN == 'true'
with:
fetch-depth: 0
token: ${{ secrets.CLOUD_JAVA_BOT_TOKEN }}
- name: Generate changed libraries
shell: bash
run: |
set -x
[ -z "$(git config user.email)" ] && git config --global user.email "[email protected]"
[ -z "$(git config user.name)" ] && git config --global user.name "cloud-java-bot"
bash .github/scripts/hermetic_library_generation.sh \
--target_branch ${{ github.base_ref }} \
--current_branch ${{ github.head_ref }}
env:
GH_TOKEN: ${{ secrets.CLOUD_JAVA_BOT_TOKEN }}
- uses: googleapis/sdk-platform-java/.github/[email protected]
blakeli0 marked this conversation as resolved.
Show resolved Hide resolved
if: env.SHOULD_RUN == 'true'
with:
base_ref: ${{ github.base_ref }}
head_ref: ${{ github.head_ref }}
token: ${{ secrets.CLOUD_JAVA_BOT_TOKEN }}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ If you are using Maven, add this to your pom.xml file:
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-pubsublite</artifactId>
<version>1.14.1</version>
<version>1.14.2</version>
</dependency>
<dependency>
<groupId>com.google.cloud</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/pubsublite/v1/admin.proto

// Protobuf Java Version: 3.25.4
// Protobuf Java Version: 3.25.5
package com.google.cloud.pubsublite.proto;

public final class AdminProto {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/pubsublite/v1/common.proto

// Protobuf Java Version: 3.25.4
// Protobuf Java Version: 3.25.5
package com.google.cloud.pubsublite.proto;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/pubsublite/v1/common.proto

// Protobuf Java Version: 3.25.4
// Protobuf Java Version: 3.25.5
package com.google.cloud.pubsublite.proto;

public interface AttributeValuesOrBuilder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/pubsublite/v1/cursor.proto

// Protobuf Java Version: 3.25.4
// Protobuf Java Version: 3.25.5
package com.google.cloud.pubsublite.proto;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/pubsublite/v1/cursor.proto

// Protobuf Java Version: 3.25.4
// Protobuf Java Version: 3.25.5
package com.google.cloud.pubsublite.proto;

public interface CommitCursorRequestOrBuilder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/pubsublite/v1/cursor.proto

// Protobuf Java Version: 3.25.4
// Protobuf Java Version: 3.25.5
package com.google.cloud.pubsublite.proto;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/pubsublite/v1/cursor.proto

// Protobuf Java Version: 3.25.4
// Protobuf Java Version: 3.25.5
package com.google.cloud.pubsublite.proto;

public interface CommitCursorResponseOrBuilder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/pubsublite/v1/common.proto

// Protobuf Java Version: 3.25.4
// Protobuf Java Version: 3.25.5
package com.google.cloud.pubsublite.proto;

public final class CommonProto {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/pubsublite/v1/topic_stats.proto

// Protobuf Java Version: 3.25.4
// Protobuf Java Version: 3.25.5
package com.google.cloud.pubsublite.proto;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/pubsublite/v1/topic_stats.proto

// Protobuf Java Version: 3.25.4
// Protobuf Java Version: 3.25.5
package com.google.cloud.pubsublite.proto;

public interface ComputeHeadCursorRequestOrBuilder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/pubsublite/v1/topic_stats.proto

// Protobuf Java Version: 3.25.4
// Protobuf Java Version: 3.25.5
package com.google.cloud.pubsublite.proto;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/pubsublite/v1/topic_stats.proto

// Protobuf Java Version: 3.25.4
// Protobuf Java Version: 3.25.5
package com.google.cloud.pubsublite.proto;

public interface ComputeHeadCursorResponseOrBuilder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/pubsublite/v1/topic_stats.proto

// Protobuf Java Version: 3.25.4
// Protobuf Java Version: 3.25.5
package com.google.cloud.pubsublite.proto;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/pubsublite/v1/topic_stats.proto

// Protobuf Java Version: 3.25.4
// Protobuf Java Version: 3.25.5
package com.google.cloud.pubsublite.proto;

public interface ComputeMessageStatsRequestOrBuilder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/pubsublite/v1/topic_stats.proto

// Protobuf Java Version: 3.25.4
// Protobuf Java Version: 3.25.5
package com.google.cloud.pubsublite.proto;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/pubsublite/v1/topic_stats.proto

// Protobuf Java Version: 3.25.4
// Protobuf Java Version: 3.25.5
package com.google.cloud.pubsublite.proto;

public interface ComputeMessageStatsResponseOrBuilder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/pubsublite/v1/topic_stats.proto

// Protobuf Java Version: 3.25.4
// Protobuf Java Version: 3.25.5
package com.google.cloud.pubsublite.proto;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/pubsublite/v1/topic_stats.proto

// Protobuf Java Version: 3.25.4
// Protobuf Java Version: 3.25.5
package com.google.cloud.pubsublite.proto;

public interface ComputeTimeCursorRequestOrBuilder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/pubsublite/v1/topic_stats.proto

// Protobuf Java Version: 3.25.4
// Protobuf Java Version: 3.25.5
package com.google.cloud.pubsublite.proto;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/pubsublite/v1/topic_stats.proto

// Protobuf Java Version: 3.25.4
// Protobuf Java Version: 3.25.5
package com.google.cloud.pubsublite.proto;

public interface ComputeTimeCursorResponseOrBuilder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/pubsublite/v1/admin.proto

// Protobuf Java Version: 3.25.4
// Protobuf Java Version: 3.25.5
package com.google.cloud.pubsublite.proto;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/pubsublite/v1/admin.proto

// Protobuf Java Version: 3.25.4
// Protobuf Java Version: 3.25.5
package com.google.cloud.pubsublite.proto;

public interface CreateReservationRequestOrBuilder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/pubsublite/v1/admin.proto

// Protobuf Java Version: 3.25.4
// Protobuf Java Version: 3.25.5
package com.google.cloud.pubsublite.proto;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/pubsublite/v1/admin.proto

// Protobuf Java Version: 3.25.4
// Protobuf Java Version: 3.25.5
package com.google.cloud.pubsublite.proto;

public interface CreateSubscriptionRequestOrBuilder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/pubsublite/v1/admin.proto

// Protobuf Java Version: 3.25.4
// Protobuf Java Version: 3.25.5
package com.google.cloud.pubsublite.proto;

/**
Expand Down
Loading
Loading