File tree Expand file tree Collapse file tree 1 file changed +19
-4
lines changed Expand file tree Collapse file tree 1 file changed +19
-4
lines changed Original file line number Diff line number Diff line change @@ -66,11 +66,16 @@ jobs:
6666 run : ./build.sh publishcontainers
6767
6868 release-lambda :
69+ environment :
70+ name : link-index-updater-prod
6971 runs-on : ubuntu-latest
7072 needs :
7173 - release-drafter
7274 permissions :
7375 contents : write
76+ id-token : write
77+ env :
78+ ZIP_FILE : link-index-updater-lambda.zip
7479 steps :
7580 - uses : actions/checkout@v4
7681 with :
@@ -81,13 +86,23 @@ jobs:
8186 - name : Get bootstrap binary
8287 run : |
8388 docker cp $(docker create --name tc publish-links-index:latest):/app/.artifacts/publish ./.artifacts && docker rm tc
84-
85- # TODO publish to AWS
89+
90+ - uses : aws-actions/configure-aws-credentials@ececac1a45f3b08a01d2dd070d28d111c5fe6722 # v4.1.0
91+ with :
92+ role-to-assume : arn:aws:iam::197730964718:role/elastic-docs-v3-link-index-updater-deployer
93+ aws-region : us-east-2
94+
95+ - name : Upload Lambda function
96+ run : |
97+ zip "${ZIP_FILE}" .artifacts/docs-lambda-index-publisher/release_linux-x64/bootstrap
98+ aws lambda update-function-code \
99+ --function-name elastic-docs-v3-link-index-updater \
100+ --zip-file "fileb://${ZIP_FILE}"
101+
86102 - name : Attach Distribution to release
87103 env :
88104 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
89- run : gh release upload ${{ needs.release-drafter.outputs.tag_name }} .artifacts/docs-lambda-index-publisher/release_linux-x64/bootstrap
90- shell : bash
105+ run : gh release upload ${{ needs.release-drafter.outputs.tag_name }} "${ZIP_FILE}"
91106
92107 release :
93108 needs :
You can’t perform that action at this time.
0 commit comments