Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 19 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,16 @@ jobs:
run: ./build.sh publishcontainers

release-lambda:
environment:
name: link-index-updater-prod
runs-on: ubuntu-latest
needs:
- release-drafter
permissions:
contents: write
id-token: write
env:
ZIP_FILE: link-index-updater-lambda.zip
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -81,13 +86,23 @@ jobs:
- name: Get bootstrap binary
run: |
docker cp $(docker create --name tc publish-links-index:latest):/app/.artifacts/publish ./.artifacts && docker rm tc

# TODO publish to AWS

- uses: aws-actions/configure-aws-credentials@ececac1a45f3b08a01d2dd070d28d111c5fe6722 # v4.1.0
with:
role-to-assume: arn:aws:iam::197730964718:role/elastic-docs-v3-link-index-updater-deployer
aws-region: us-east-2

- name: Upload Lambda function
run: |
zip "${ZIP_FILE}" .artifacts/docs-lambda-index-publisher/release_linux-x64/bootstrap
aws lambda update-function-code \
--function-name elastic-docs-v3-link-index-updater \
--zip-file "fileb://${ZIP_FILE}"

- name: Attach Distribution to release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release upload ${{ needs.release-drafter.outputs.tag_name }} .artifacts/docs-lambda-index-publisher/release_linux-x64/bootstrap
shell: bash
run: gh release upload ${{ needs.release-drafter.outputs.tag_name }} "${ZIP_FILE}"

release:
needs:
Expand Down
Loading