-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge main to project branch. Merge conflicts in generated code are i…
…gnored.
- Loading branch information
Showing
1,724 changed files
with
728,916 additions
and
68,877 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
name: Generate Documentation | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
permissions: | ||
id-token: write | ||
|
||
jobs: | ||
generate-docs: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
# Use strategy to split up the work into 32 jobs | ||
job: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31] | ||
runs-on: ubuntu-latest | ||
container: swift:5.9-jammy | ||
env: | ||
IGNORE: none | ||
outputs: | ||
version: ${{ steps.set-version.outputs.version }} | ||
steps: | ||
- name: Checkout Sources | ||
uses: actions/checkout@v4 | ||
- name: Configure AWS Credentials | ||
uses: aws-actions/configure-aws-credentials@v4 | ||
with: | ||
role-to-assume: ${{ secrets.CD_API_REFS_PUBLISH_ROLE_ARN }} | ||
aws-region: us-east-1 | ||
- name: Install AWS CLI, jq, and native dependencies | ||
run: | | ||
DEBIAN_FRONTEND="noninteractive" apt-get update | ||
apt-get -y install curl unzip openssl libssl-dev jq | ||
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" | ||
unzip awscliv2.zip && ./aws/install | ||
- name: Extract version from GITHUB_REF | ||
id: set-version | ||
shell: bash | ||
run: | | ||
if [[ $GITHUB_REF == refs/tags/* ]]; then | ||
echo "Tagged release" | ||
# get last part of GITHUB_REF separated by / | ||
VERSION=`echo $GITHUB_REF | tr '/' '\n' | tail -1` | ||
echo "Version: $VERSION" | ||
echo "VERSION=$VERSION" >> "$GITHUB_ENV" | ||
echo "version=$VERSION" >> "$GITHUB_OUTPUT" | ||
else | ||
echo "Error: runs on a tag only" | ||
exit 1 | ||
fi | ||
- name: Generate docs | ||
run: | | ||
DOCS_BUCKET=${{ secrets.CD_API_REFS_BUCKET_NAME }} \ | ||
./scripts/generatedocc.sh "$VERSION" ${{ matrix.job }} ${{ strategy.job-total }} ${{ env.IGNORE }} | ||
update-latest: | ||
needs: generate-docs | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Configure AWS Credentials for publish role | ||
uses: aws-actions/configure-aws-credentials@v4 | ||
with: | ||
role-to-assume: ${{ secrets.CD_API_REFS_PUBLISH_ROLE_ARN }} | ||
aws-region: us-east-1 | ||
- name: Install AWS CLI | ||
run: | | ||
# Need to install aws cli from latest since GH runner doesn't yet have | ||
# cloudfront-keyvaluestore in the preinstalled version | ||
DEBIAN_FRONTEND="noninteractive" sudo apt-get update | ||
sudo apt-get -y install curl unzip | ||
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" | ||
unzip awscliv2.zip && sudo ./aws/install --update | ||
- name: Update Cloudfront key value store | ||
env: | ||
VERSION: ${{ needs.generate-docs.outputs.version }} | ||
run: | | ||
export KVS_ETAG=`aws cloudfront-keyvaluestore describe-key-value-store \ | ||
--output text \ | ||
--query ETag \ | ||
--kvs-arn "${{ secrets.CD_CLOUDFRONT_KVS_ARN }}"` | ||
aws cloudfront-keyvaluestore put-key \ | ||
--kvs-arn "${{ secrets.CD_CLOUDFRONT_KVS_ARN }}" \ | ||
--if-match "$KVS_ETAG" \ | ||
--key latest \ | ||
--value "$VERSION" | ||
- name: Configure AWS Credentials for invalidation role | ||
uses: aws-actions/configure-aws-credentials@v4 | ||
with: | ||
role-to-assume: ${{ secrets.CD_API_REFS_INVALIDATE_ROLE_ARN }} | ||
aws-region: us-east-1 | ||
role-chaining: true | ||
role-skip-session-tagging: true | ||
- name: Invalidate sdk.amazonaws.com cache | ||
run: | | ||
aws cloudfront create-invalidation \ | ||
--distribution-id "${{ secrets.CD_CLOUDFRONT_PUBLIC_DISTRIBUTION_ID }}" \ | ||
--paths "/swift/*" | ||
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.