4444 })
4545
4646 containers :
47+ needs :
48+ - release-drafter
4749 runs-on : ubuntu-latest
4850 outputs :
4951 full-version : ${{ steps.bootstrap.outputs.full-version }}
5254 steps :
5355 - uses : actions/checkout@v4
5456 with :
55- ref : ${{ steps .release-drafter.outputs.tag_name }}
57+ ref : ${{ needs .release-drafter.outputs.tag_name }}
5658 - name : Bootstrap Action Workspace
5759 id : bootstrap
5860 uses : ./.github/actions/bootstrap
@@ -65,46 +67,48 @@ jobs:
6567 password : ${{ secrets.GITHUB_TOKEN }}
6668
6769 - name : Publish Containers
68- run : ./build.sh publishcontainers
70+ run : ./build.sh publishcontainers\
71+
72+ build-lambda :
73+ needs :
74+ - release-drafter
75+ uses : ./.github/workflows/build-link-index-updater-lambda.yml
76+ with :
77+ ref : ${{ needs.release-drafter.outputs.tag_name }}
6978
7079 release-lambda :
7180 environment :
7281 name : link-index-updater-prod
7382 runs-on : ubuntu-latest
7483 needs :
84+ - build-lambda
7585 - release-drafter
7686 permissions :
7787 contents : write
7888 id-token : write
7989 env :
80- ZIP_FILE : link-index-updater- lambda.zip
90+ ZIP_FILE : ${{ needs.build- lambda.outputs.artifact-path }}
8191 steps :
82- - uses : actions/checkout@v4
83- with :
84- ref : ${{ steps.release-drafter.outputs.tag_name }}
85- - name : Amazon Linux 2023 build
86- run : |
87- docker build . -t publish-links-index:latest -f src/infra/docs-lambda-index-publisher/lambda.DockerFile
88- - name : Get bootstrap binary
89- run : |
90- docker cp $(docker create --name tc publish-links-index:latest):/app/.artifacts/publish ./.artifacts && docker rm tc
91-
92+
93+ - uses : actions/download-artifact@v4
94+ with :
95+ artifact-ids : ${{ needs.build-lambda.outputs.artifact-id }}
96+
9297 - uses : aws-actions/configure-aws-credentials@ececac1a45f3b08a01d2dd070d28d111c5fe6722 # v4.1.0
9398 with :
9499 role-to-assume : arn:aws:iam::197730964718:role/elastic-docs-v3-link-index-updater-deployer
95100 aws-region : us-east-2
96-
101+
97102 - name : Upload Lambda function
98- run : |
99- zip -j "${ZIP_FILE}" .artifacts/docs-lambda-index-publisher/release_linux-x64/bootstrap
103+ run : |
100104 aws lambda update-function-code \
101105 --function-name elastic-docs-v3-link-index-updater \
102106 --zip-file "fileb://${ZIP_FILE}"
103107
104108 - name : Attach Distribution to release
105109 env :
106110 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
107- run : gh release upload ${{ needs.release-drafter.outputs.tag_name }} "${ZIP_FILE}"
111+ run : gh release upload --repo ${{ github.repository }} ${{ needs.release-drafter.outputs.tag_name }} "${ZIP_FILE}"
108112
109113 release :
110114 needs :
@@ -126,7 +130,7 @@ jobs:
126130 steps :
127131 - uses : actions/checkout@v4
128132 with :
129- ref : ${{ steps .release-drafter.outputs.tag_name }}
133+ ref : ${{ needs .release-drafter.outputs.tag_name }}
130134
131135 - name : Bootstrap Action Workspace
132136 id : bootstrap
0 commit comments