diff --git a/.github/actions/docker-build/action.yml b/.github/actions/docker-build/action.yml index b66b34ab9adc4631200c5e1d81ec9f0de819aa80..84f0021546c4f9b0be35a2b70a32f04a8e72a8a3 100644 --- a/.github/actions/docker-build/action.yml +++ b/.github/actions/docker-build/action.yml @@ -12,11 +12,18 @@ inputs: action-arguments: description: Arguments to pass to the action required: false + use_cache: + description: Whether to use the gradle cache + type: boolean + required: false + default: true + runs: using: composite steps: - - uses: actions/cache@v4 - name: Gradle Cache + - name: Gradle Cache + if: ${{ github.event.inputs.use_cache == 'true' }} + uses: actions/cache@v4 with: path: | gradle/caches @@ -24,7 +31,7 @@ runs: key: ${{ runner.os }}-gradle-${{ hashFiles('gradle/caches/**/*', 'gradle/wrapper/**/*') }} restore-keys: | ${{ runner.os }}-gradle- - # Pinned to the commit hash of v2.7.3 + # Pinned to the commit hash of v2.7.3 - uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 with: shared-key: ${{ runner.os }}-${{ github.job }} @@ -53,7 +60,7 @@ runs: # configuration won't cause each individual action to build its own image, which would # drastically increase the total CI time. Fail fast! ALLOW_LOCAL_BUILD=false ./smithy-rs/.github/scripts/acquire-build-image - # This runs the commands from the matrix strategy + # This runs the commands from the matrix strategy - name: Run ${{ inputs.action }} shell: bash run: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0a7c3374df5135c4ac88228cdb25e8dd5e48e172..4678c6ab9f3a7dfcbd49c68c08d6773ec449c918 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -124,6 +124,7 @@ jobs: uses: ./smithy-rs/.github/actions/docker-build with: action: check-semver-hazards + use_cache: false get-or-create-release-branch: name: Get or create a release branch @@ -185,13 +186,14 @@ jobs: uses: ./smithy-rs/.github/actions/docker-build with: action: generate-smithy-rs-release + use_cache: false - name: Download all artifacts uses: ./smithy-rs/.github/actions/download-all-artifacts - # This step is not idempotent, as it pushes release artifacts to the `smithy-rs-release-1.x.y` branch. However, - # if this step succeeds but a subsequent step fails, retrying the release workflow is "safe" in that it does not - # create any inconsistent states; this step would simply fail because the release branch would be ahead of `main` - # due to previously pushed artifacts. - # To successfully retry a release, revert the commits in the release branch that pushed the artifacts. + # This step is not idempotent, as it pushes release artifacts to the `smithy-rs-release-1.x.y` branch. However, + # if this step succeeds but a subsequent step fails, retrying the release workflow is "safe" in that it does not + # create any inconsistent states; this step would simply fail because the release branch would be ahead of `main` + # due to previously pushed artifacts. + # To successfully retry a release, revert the commits in the release branch that pushed the artifacts. - name: Push smithy-rs changes shell: bash working-directory: smithy-rs-release/smithy-rs @@ -219,7 +221,7 @@ jobs: fi fi echo "commit_sha=$(git rev-parse HEAD)" > $GITHUB_OUTPUT - # This step is idempotent; the `publisher` will not publish a crate if the version is already published on crates.io. + # This step is idempotent; the `publisher` will not publish a crate if the version is already published on crates.io. - name: Publish to crates.io shell: bash working-directory: smithy-rs-release/crates-to-publish @@ -241,8 +243,8 @@ jobs: else publisher publish -y --location . fi - # This step is not idempotent and MUST be performed last, as it will generate a new release in the `smithy-rs` - # repository with the release tag that is always unique and has an increasing numerical suffix. + # This step is not idempotent and MUST be performed last, as it will generate a new release in the `smithy-rs` + # repository with the release tag that is always unique and has an increasing numerical suffix. - name: Tag release uses: actions/github-script@v7 with: