-
Notifications
You must be signed in to change notification settings - Fork 142
Add the deploy workflow for the log uploader lambdas #8593
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
huydhn
wants to merge
11
commits into
gh/huydhn/4/base
Choose a base branch
from
gh/huydhn/4/head
base: gh/huydhn/4/base
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 10 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
5812d9c
Update
huydhn d445222
Update
huydhn 10cce37
Update
huydhn ebd26d9
Update
huydhn 6a2a4e9
Update
huydhn e9c1eff
Update
huydhn ead9a16
Update
huydhn a86d6ba
Update
huydhn 73aca42
Update
huydhn 1385ca0
Update
huydhn 9bad4bc
Update
huydhn File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| name: Test and deploy gha-log-uploader | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| paths: | ||
| - ".github/workflows/gha-log-uploader-lambda.yml" | ||
| - "aws/lambda/gha-log-uploader/**" | ||
| pull_request: | ||
| paths: | ||
| - ".github/workflows/gha-log-uploader-lambda.yml" | ||
| - "aws/lambda/gha-log-uploader/**" | ||
|
|
||
| defaults: | ||
| run: | ||
| working-directory: aws/lambda/gha-log-uploader/ | ||
|
|
||
| jobs: | ||
| test: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
| - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 | ||
| with: | ||
| python-version: '3.12' | ||
| cache: pip | ||
| - run: pip3 install -r requirements.txt pytest | ||
| - run: pytest -v test_lambda_function.py | ||
|
huydhn marked this conversation as resolved.
|
||
|
|
||
| deploy: | ||
| needs: test | ||
| runs-on: ubuntu-latest | ||
| if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} | ||
| permissions: | ||
| id-token: write | ||
| contents: read | ||
| steps: | ||
| - name: configure aws credentials | ||
| uses: aws-actions/configure-aws-credentials@67fbcbb121271f7775d2e7715933280b06314838 # v1.7.0 | ||
| with: | ||
| role-to-assume: arn:aws:iam::308535385114:role/gha_workflow_gha-log-uploader-lambda | ||
|
huydhn marked this conversation as resolved.
|
||
| aws-region: us-east-1 | ||
|
|
||
| - name: Check out test infra | ||
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
|
|
||
| - name: Setup python | ||
| uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 | ||
|
|
||
| - uses: nick-fields/retry@3e91a01664abd3c5cd539100d10d33b9c5b68482 # v2.8.2 | ||
| name: Setup dependencies | ||
| with: | ||
| shell: bash | ||
| timeout_minutes: 10 | ||
| max_attempts: 3 | ||
| retry_wait_seconds: 30 | ||
| command: | | ||
| set -eux | ||
| python3 -m pip install awscli==1.45.39 | ||
|
|
||
| - name: Deploy the lambda | ||
| run: make deploy | ||
|
huydhn marked this conversation as resolved.
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.