diff --git a/.github/workflows/codegen.yml b/.github/workflows/codegen.yml index efd865a488c..57a13dc8e76 100644 --- a/.github/workflows/codegen.yml +++ b/.github/workflows/codegen.yml @@ -38,17 +38,18 @@ jobs: with: go-version: ${{ matrix.go-version }} - - uses: actions/checkout@v2 - with: - repository: aws/smithy-go - path: tmp-smithy-go + - name: Find smithy-go + env: + TRIGGERING_ACTOR: ${{ github.event.pull_request.head.repo.owner.login }} + RUNNER_TMPDIR: ${{ runner.temp }} + run: ./ci-find-smithy-go.sh - name: Build and publish smithy-go - working-directory: tmp-smithy-go + working-directory: ${{ runner.temp }}/smithy-go run: make smithy-publish-local - name: Cleanup smithy-go - run: rm -rf tmp-smithy-go + run: rm -rf ${{ runner.temp }}/smithy-go - name: SDK Codegen run: make smithy-generate diff --git a/ci-find-smithy-go.sh b/ci-find-smithy-go.sh index 4da5d09cbf6..2c8549220c8 100755 --- a/ci-find-smithy-go.sh +++ b/ci-find-smithy-go.sh @@ -9,9 +9,8 @@ # - feat-foo-bar # - feat-foo -if [ -z "$SMITHY_GO_REPOSITORY" ]; then - SMITHY_GO_REPOSITORY=aws/smithy-go -fi +SMITHY_GO_REPOSITORY=$TRIGGERING_ACTOR/smithy-go +echo $SMITHY_GO_REPOSITORY if [ -z "$RUNNER_TMPDIR" ]; then echo env RUNNER_TMPDIR is required @@ -56,3 +55,4 @@ fi git clone -b "$matched_branch" "$repository" "$RUNNER_TMPDIR"/smithy-go SMITHY_GO_SRC=$RUNNER_TMPDIR/smithy-go make gen-mod-replace-smithy-. +echo $SMITHY_GO_SRC diff --git a/codegen/smithy-aws-go-codegen/src/main/java/software/amazon/smithy/aws/go/codegen/AwsProtocolUtils.java b/codegen/smithy-aws-go-codegen/src/main/java/software/amazon/smithy/aws/go/codegen/AwsProtocolUtils.java index 5997086aed0..aab0d15254a 100644 --- a/codegen/smithy-aws-go-codegen/src/main/java/software/amazon/smithy/aws/go/codegen/AwsProtocolUtils.java +++ b/codegen/smithy-aws-go-codegen/src/main/java/software/amazon/smithy/aws/go/codegen/AwsProtocolUtils.java @@ -18,7 +18,6 @@ import java.util.Set; import java.util.TreeSet; -import software.amazon.smithy.aws.go.codegen.customization.AwsCustomGoDependency; import software.amazon.smithy.codegen.core.Symbol; import software.amazon.smithy.go.codegen.GoWriter; import software.amazon.smithy.go.codegen.SmithyGoDependency; @@ -31,7 +30,6 @@ import software.amazon.smithy.go.codegen.integration.HttpProtocolUnitTestResponseGenerator; import software.amazon.smithy.go.codegen.integration.IdempotencyTokenMiddlewareGenerator; import software.amazon.smithy.go.codegen.integration.ProtocolGenerator.GenerationContext; -import software.amazon.smithy.model.shapes.Shape; import software.amazon.smithy.model.shapes.ShapeId; import software.amazon.smithy.utils.SetUtils;