Skip to content

Commit e86d2a6

Browse files
committed
Refactor
1 parent 7affbcc commit e86d2a6

File tree

2 files changed

+13
-17
lines changed

2 files changed

+13
-17
lines changed
Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
# This workflow is used to build the link index updater lambda function zip
3-
# that can be deployed to AWS Lambda.
2+
# This workflow is used to build the link-index-updater
3+
# lambda function bootstrap binary that can be deployed to AWS Lambda.
44
name: Build Link Index Updater Lambda
55

66
on:
@@ -15,18 +15,15 @@ on:
1515
artifact-id:
1616
description: 'Artifact ID of the uploaded artifact. Can be used to download the artifact in other workflows.'
1717
value: ${{ jobs.build.outputs.artifact-id }}
18-
artifact-path:
19-
description: 'Path to the zip file.'
20-
value: ${{ jobs.build.outputs.zip-file }}
21-
18+
2219
jobs:
2320
build:
2421
outputs:
2522
artifact-id: ${{ steps.upload-artifact.outputs.artifact-id }}
2623
zip-file: ${{ steps.create-zip.outputs.zip-file }}
2724
runs-on: ubuntu-latest
2825
env:
29-
ZIP_FILE: link-index-updater-lambda.zip
26+
BINARY_PATH: .artifacts/docs-lambda-index-publisher/release_linux-x64/bootstrap
3027
steps:
3128
- uses: actions/checkout@v4
3229
with:
@@ -40,17 +37,12 @@ jobs:
4037
- name: Inspect bootstrap binary
4138
run: |
4239
tree .artifacts
43-
stat .artifacts/docs-lambda-index-publisher/release_linux-x64/bootstrap
44-
- name: Create zip file
45-
id: create-zip
46-
run: |
47-
zip -j "${ZIP_FILE}" .artifacts/docs-lambda-index-publisher/release_linux-x64/bootstrap
48-
echo "zip-file=${ZIP_FILE}" >> "${GITHUB_OUTPUT}"
40+
stat "${BINARY_PATH}"
4941
- name: Archive artifact
5042
id: upload-artifact
5143
uses: actions/upload-artifact@v4
5244
with:
53-
name: link-index-updater-lambda
45+
name: link-index-updater-lambda-binary
5446
retention-days: 1
5547
if-no-files-found: error
56-
path: ${{ env.ZIP_FILE }}
48+
path: ${{ env.BINARY_PATH }}

.github/workflows/release.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,18 +87,22 @@ jobs:
8787
contents: write
8888
id-token: write
8989
env:
90-
ZIP_FILE: ${{ needs.build-lambda.outputs.artifact-path }}
90+
ZIP_FILE: link-index-updater-lambda.zip
9191
steps:
9292

9393
- uses: actions/download-artifact@v4
9494
with:
9595
artifact-ids: ${{ needs.build-lambda.outputs.artifact-id }}
9696

97+
- name: Create zip
98+
run: |
99+
zip -j "${ZIP_FILE}" ./bootstrap
100+
97101
- uses: aws-actions/configure-aws-credentials@ececac1a45f3b08a01d2dd070d28d111c5fe6722 # v4.1.0
98102
with:
99103
role-to-assume: arn:aws:iam::197730964718:role/elastic-docs-v3-link-index-updater-deployer
100104
aws-region: us-east-2
101-
105+
102106
- name: Upload Lambda function
103107
run: |
104108
aws lambda update-function-code \

0 commit comments

Comments
 (0)