-
Notifications
You must be signed in to change notification settings - Fork 202
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reduce Docker image rebuilds (#2269)
* Move `acquire-build-image` into `.github` * Move the `tools-hash` script into `.github` * Upload to ECR from PRs as well * Move build tools into `tools/ci-build/` * Move CI scripts out of `ci-build` * Split CI for forks/non-forks * Remove `fetch-depth: 0` from PR workflows
- Loading branch information
Showing
159 changed files
with
192 additions
and
144 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
# This workflow runs CI for pull requests from forks, which can't make use of secrets. | ||
|
||
name: CI (from fork) | ||
on: | ||
pull_request: | ||
|
||
# Allow one instance of this workflow per pull request, and cancel older runs when new changes are pushed | ||
concurrency: | ||
group: ci-forks-yaml-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
# This job detects if the PR made changes to build tools. If it did, then it builds a new | ||
# build Docker image. Otherwise, it downloads a build image from Public ECR. In both cases, | ||
# it uploads the image as a build artifact for other jobs to download and use. | ||
acquire-base-image: | ||
name: Acquire Base Image | ||
if: ${{ github.event.pull_request.head.repo.full_name != 'awslabs/smithy-rs' }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
path: smithy-rs | ||
- name: Acquire base image | ||
id: acquire | ||
env: | ||
DOCKER_BUILDKIT: 1 | ||
run: ./smithy-rs/.github/scripts/acquire-build-image | ||
- name: Upload base image | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: smithy-rs-base-image | ||
path: smithy-rs-base-image | ||
retention-days: 1 | ||
|
||
# Run shared CI after the Docker build image has either been rebuilt or found in ECR | ||
ci: | ||
needs: acquire-base-image | ||
if: ${{ github.event.pull_request.head.repo.full_name != 'awslabs/smithy-rs' }} | ||
uses: ./.github/workflows/ci.yml | ||
with: | ||
run_sdk_examples: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.