chore(deps): update index-sources/aws-cli digest to e2711f9 #7347
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
name: CI | |
on: | |
push: | |
branches: | |
- main | |
- staging | |
- trying | |
- 'renovate/*' | |
pull_request: | |
branches: | |
- main | |
jobs: | |
check-license-headers: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Check license headers | |
run: | | |
./hack/check-license-headers.sh | |
yamllint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: yamllint | |
uses: ibiqlik/action-yamllint@v3 | |
build-and-test: | |
runs-on: ubuntu-latest | |
outputs: | |
awscli-hash: ${{ steps.submodule-hashes.outputs.awscli-hash }} | |
cfnlint-hash: ${{ steps.submodule-hashes.outputs.cfnlint-hash }} | |
botocore-hash: ${{ steps.submodule-hashes.outputs.botocore-hash }} | |
steps: | |
- name: Install node toolchain | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20' | |
- name: Install Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.9' | |
- name: Install Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: 1.19.x | |
- name: Install jsonnet | |
run: go install github.com/google/go-jsonnet/cmd/jsonnet@latest | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- run: npm ci | |
- run: npx eslint . | |
- name: Get submodule commit hashes | |
id: submodule-hashes | |
run: | | |
awscli_hash="$(git rev-parse @:index-sources/aws-cli)" | |
cfnlint_hash="$(git rev-parse @:index-sources/cfn-lint)" | |
botocore_hash="$(git rev-parse @:index-sources/botocore)" | |
echo "awscli-hash=${awscli_hash}" >> $GITHUB_OUTPUT | |
echo "cfnlint-hash=${cfnlint_hash}" >> $GITHUB_OUTPUT | |
echo "botocore-hash=${botocore_hash}" >> $GITHUB_OUTPUT | |
- name: 'aws-cli: index cache' | |
id: cache-awscli | |
uses: actions/cache@v3 | |
with: | |
path: | | |
index-sources/aws-cli/doc/build/ | |
extension/index/cli.js | |
json-indices/cli.json | |
key: indices-awscli-${{ steps.submodule-hashes.outputs.awscli-hash }}-${{ hashFiles('hack/generate-index-cli.py') }} | |
- name: 'cfn-lint: index cache' | |
id: cache-cfnlint | |
uses: actions/cache@v3 | |
with: | |
path: | | |
extension/index/cfn.v2.js | |
json-indices/cfn.json | |
json-indices/cfn.v2.json | |
key: indices-cfnlint-${{ steps.submodule-hashes.outputs.cfnlint-hash }}-${{ hashFiles('hack/generate-index-cfn.py') }} | |
- name: 'botocore: index cache' | |
id: cache-botocore | |
uses: actions/cache@v3 | |
with: | |
path: | | |
extension/index/api.js | |
json-indices/api.json | |
key: indices-botocore-${{ steps.submodule-hashes.outputs.botocore-hash }}-${{ hashFiles('hack/generate-index-api.py') }} | |
- name: 'aws-cli: Build aws-cli docs' | |
if: steps.cache-awscli.outputs.cache-hit != 'true' | |
working-directory: index-sources/aws-cli/ | |
run: | | |
pip install -r requirements.txt | |
pip install -r requirements-docs.txt | |
pip install -e . | |
make -C doc json | |
- name: 'aws-cli: Generate index' | |
if: steps.cache-awscli.outputs.cache-hit != 'true' | |
run: | | |
hack/generate-index-cli.py | |
hack/generate-index-cli.py --export-as-json | |
- name: 'aws-cli: verify generated index (v1)' | |
if: steps.cache-awscli.outputs.cache-hit != 'true' | |
run: | | |
node_modules/.bin/ajv validate \ | |
-s hack/index-schemas/cli.schema.json \ | |
-d json-indices/cli.json | |
- name: 'aws-cli: verify generated index (v2)' | |
if: steps.cache-awscli.outputs.cache-hit != 'true' | |
run: | | |
node_modules/.bin/ajv validate \ | |
-s hack/index-schemas/cli.v2.schema.json \ | |
-d json-indices/cli.v2.json | |
- name: 'cfn-lint: Generate index' | |
if: steps.cache-cfnlint.outputs.cache-hit != 'true' | |
run: | | |
hack/generate-index-cfn.py | |
hack/generate-index-cfn.py --export-as-json | |
- name: 'cfn-lint: verify generated index' | |
if: steps.cache-cfnlint.outputs.cache-hit != 'true' | |
run: | | |
node_modules/.bin/ajv validate \ | |
-s hack/index-schemas/cfn.schema.json \ | |
-d json-indices/cfn.json | |
- name: 'botocore: Generate index' | |
if: steps.cache-botocore.outputs.cache-hit != 'true' | |
run: | | |
hack/generate-index-api.py | |
hack/generate-index-api.py --export-as-json | |
- name: 'botocore: verify generated index' | |
if: steps.cache-botocore.outputs.cache-hit != 'true' | |
run: | | |
node_modules/.bin/ajv validate \ | |
-s hack/index-schemas/api.schema.json \ | |
-d json-indices/api.json | |
- name: 'Firefox: prepare manifest' | |
run: make firefox | |
- name: 'Firefox: web-ext build' | |
uses: kewisch/action-web-ext@v1 | |
id: web-ext-build-firefox | |
with: | |
cmd: build | |
source: extension | |
artifacts: web-ext-artifacts/firefox/ | |
- name: 'Chrome: prepare manifest' | |
run: make chrome | |
- name: 'Chrome: web-ext build' | |
uses: kewisch/action-web-ext@v1 | |
id: web-ext-build-chrome | |
with: | |
cmd: build | |
source: extension | |
artifacts: web-ext-artifacts/chrome/ | |
- name: 'Edge: prepare manifest' | |
run: make edge | |
- name: 'Edge: web-ext build' | |
uses: kewisch/action-web-ext@v1 | |
id: web-ext-build-edge | |
with: | |
cmd: build | |
source: extension | |
artifacts: web-ext-artifacts/edge/ | |
- name: Upload extension-ZIPs as artifact to workflow | |
uses: actions/upload-artifact@v4 | |
with: | |
name: aws-search-extension | |
path: | | |
${{ steps.web-ext-build-firefox.outputs.target }} | |
${{ steps.web-ext-build-chrome.outputs.target }} | |
${{ steps.web-ext-build-edge.outputs.target }} | |
- name: Upload JSON-indices as artifact to workflow | |
uses: actions/upload-artifact@v4 | |
with: | |
name: indices | |
path: | | |
extension/index/*.js | |
json-indices/*.json | |
commit-indices: | |
runs-on: ubuntu-latest | |
needs: | |
- build-and-test | |
if: github.ref == 'refs/heads/main' | |
steps: | |
- name: Checkout indices branch | |
uses: actions/checkout@v4 | |
with: | |
ref: indices | |
- name: Retrieve indices | |
uses: actions/download-artifact@v4 | |
with: | |
name: indices | |
- name: Move downloaded indices | |
run: | | |
rm -rf extension/ || : | |
mv json-indices/*.json . | |
rmdir json-indices/ | |
- name: Commit updated index | |
run: | | |
function git_commit { | |
local file="$1" | |
local subject="$2" | |
local message="$3" | |
local echo_commit="$4" | |
local echo_nocommit="$5" | |
local status=0 | |
git add "$file" | |
git \ | |
-c "user.name=GitHub" \ | |
-c "[email protected]" \ | |
commit \ | |
--quiet \ | |
--author="github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>" \ | |
--message "$subject" \ | |
--message "$message" \ | |
2>/dev/null || status=$? | |
case "$status" in | |
0) | |
echo "$echo_commit" | |
;; | |
1) | |
# Couldn't create a commit because it would have been empty. | |
echo "$echo_nocommit" | |
;; | |
*) | |
echo "An unknown error has occurred, exitting!" | |
exit 1 | |
;; | |
esac | |
} | |
git_commit \ | |
"cli.json" \ | |
"⌨️ cli: index updated" \ | |
"Based on aws/aws-cli#${{ needs.build-and-test.outputs.awscli-hash }}" \ | |
"⌨️ cli: created commit" \ | |
"⌨️ cli: no update needed, not committing" \ | |
; | |
git_commit \ | |
"cfn.json" \ | |
"☁️ cfn: index updated" \ | |
"Based on aws-cloudformation/cfn-lint#${{ needs.build-and-test.outputs.cfnlint-hash }}" \ | |
"☁️ cfn: created commit" \ | |
"☁️ cfn: no update needed, not committing" \ | |
; | |
git_commit \ | |
"api.json" \ | |
"📄 api: index updated" \ | |
"Based on boto/botocore#${{ needs.build-and-test.outputs.botocore-hash }}" \ | |
"📄 api: created commit" \ | |
"📄 api: no update needed, not committing" \ | |
; | |
git push |