File tree 1 file changed +19
-4
lines changed
1 file changed +19
-4
lines changed Original file line number Diff line number Diff line change @@ -66,11 +66,16 @@ jobs:
66
66
run : ./build.sh publishcontainers
67
67
68
68
release-lambda :
69
+ environment :
70
+ name : link-index-updater-prod
69
71
runs-on : ubuntu-latest
70
72
needs :
71
73
- release-drafter
72
74
permissions :
73
75
contents : write
76
+ id-token : write
77
+ env :
78
+ ZIP_FILE : link-index-updater-lambda.zip
74
79
steps :
75
80
- uses : actions/checkout@v4
76
81
with :
@@ -81,13 +86,23 @@ jobs:
81
86
- name : Get bootstrap binary
82
87
run : |
83
88
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
+
86
102
- name : Attach Distribution to release
87
103
env :
88
104
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}"
91
106
92
107
release :
93
108
needs :
You can’t perform that action at this time.
0 commit comments