Skip to content
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

Use environment variables #898

Merged
merged 1 commit into from
Sep 9, 2023
Merged
Show file tree
Hide file tree
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
32 changes: 16 additions & 16 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ jobs:
then
chmod +x ./bootstrap
fi
zip -r "../${{ env.LAMBDA_FUNCTION }}.zip" . || exit 1
zip -r "../${LAMBDA_FUNCTION}.zip" . || exit 1

- name: Publish deployment package
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
Expand Down Expand Up @@ -116,7 +116,7 @@ jobs:

- name: Set function name
run: |
echo "FUNCTION_NAME=${{ env.LAMBDA_FUNCTION }}-dev" >> "$GITHUB_ENV"
echo "FUNCTION_NAME=${LAMBDA_FUNCTION}-dev" >> "$GITHUB_ENV"

- name: Download artifacts
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
Expand All @@ -135,7 +135,7 @@ jobs:
aws lambda update-function-code \
--function-name "${FUNCTION_NAME}" \
--architectures "${LAMBDA_ARCHITECTURES}" \
--zip-file fileb://./${{ env.LAMBDA_FUNCTION }}.zip \
--zip-file "fileb://./${LAMBDA_FUNCTION}.zip" \
> /dev/null

- name: Wait for function code update
Expand All @@ -149,11 +149,11 @@ jobs:
aws lambda update-function-configuration \
--function-name "${FUNCTION_NAME}" \
--description "${LAMBDA_DESCRIPTION}" \
--handler ${{ env.LAMBDA_HANDLER }} \
--memory-size ${{ env.LAMBDA_MEMORY }} \
--role ${{ env.LAMBDA_ROLE }} \
--runtime ${{ env.LAMBDA_RUNTIME }} \
--timeout ${{ env.LAMBDA_TIMEOUT }} \
--handler "${LAMBDA_HANDLER}" \
--memory-size "${LAMBDA_MEMORY}" \
--role "${LAMBDA_ROLE}" \
--runtime "${LAMBDA_RUNTIME}" \
--timeout "${LAMBDA_TIMEOUT}" \
> /dev/null

- name: Wait for function configuration update
Expand Down Expand Up @@ -208,12 +208,12 @@ jobs:

- name: Set function name
run: |
echo "FUNCTION_NAME=${{ env.LAMBDA_FUNCTION }}" >> "$GITHUB_ENV"
echo "FUNCTION_NAME=${LAMBDA_FUNCTION}" >> "$GITHUB_ENV"

- name: Download artifacts
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
with:
name: lambda
name: ${{ env.ARTIFACT_NAME }}

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@50ac8dd1e1b10d09dac7b8727528b91bed831ac0 # v3.0.2
Expand All @@ -227,7 +227,7 @@ jobs:
aws lambda update-function-code \
--function-name "${FUNCTION_NAME}" \
--architectures "${LAMBDA_ARCHITECTURES}" \
--zip-file fileb://./${{ env.LAMBDA_FUNCTION }}.zip \
--zip-file "fileb://./${LAMBDA_FUNCTION}.zip" \
> /dev/null

- name: Wait for function code update
Expand All @@ -241,11 +241,11 @@ jobs:
aws lambda update-function-configuration \
--function-name "${FUNCTION_NAME}" \
--description "${LAMBDA_DESCRIPTION}" \
--handler ${{ env.LAMBDA_HANDLER }} \
--memory-size ${{ env.LAMBDA_MEMORY }} \
--role ${{ env.LAMBDA_ROLE }} \
--runtime ${{ env.LAMBDA_RUNTIME }} \
--timeout ${{ env.LAMBDA_TIMEOUT }} \
--handler "${LAMBDA_HANDLER}" \
--memory-size "${LAMBDA_MEMORY}" \
--role "${LAMBDA_ROLE}" \
--runtime "${LAMBDA_RUNTIME}" \
--timeout "${LAMBDA_TIMEOUT}" \
> /dev/null

- name: Wait for function configuration update
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,9 @@ jobs:

if [ "${environment_name}" == "production" ]
then
function_name="${{ env.LAMBDA_FUNCTION }}"
function_name="${LAMBDA_FUNCTION}"
else
function_name="${{ env.LAMBDA_FUNCTION }}-${environment_name}"
function_name="${LAMBDA_FUNCTION}-${environment_name}"
fi

{
Expand Down Expand Up @@ -262,7 +262,7 @@ jobs:
aws lambda update-function-code \
--function-name "${FUNCTION_NAME}" \
--architectures "${LAMBDA_ARCHITECTURES}" \
--zip-file fileb://./${{ env.LAMBDA_FUNCTION }}.zip \
--zip-file "fileb://./${LAMBDA_FUNCTION}.zip" \
> /dev/null

- name: Wait for function code update
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ on:
push:
branches: [ main ]
paths-ignore:
- '**/*.gitattributes'
- '**/*.gitignore'
- '**/*.md'
- '**/*.gitattributes'
- '**/*.gitignore'
- '**/*.md'
pull_request:
branches:
- main
Expand All @@ -28,7 +28,7 @@ jobs:
steps:

- name: Checkout code
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0

- name: Add actionlint problem matcher
run: echo "::add-matcher::.github/actionlint-matcher.json"
Expand Down