Skip to content

Bump the all-actions group across 18 directories with 13 updates #49

Bump the all-actions group across 18 directories with 13 updates

Bump the all-actions group across 18 directories with 13 updates #49

---
name: 'Run deploy-lambda-function workflow'
on:
pull_request:
paths:
# dependencies
- actions/deploy-to-s3-bucket/*
- actions/notify-slack/*
- .github/workflows/notify-slack.yml
# The code being tested
- actions/deploy-lambda-function/*
- .github/workflows/deploy-lambda-function.yml
- .github/workflows/test-deploy-lambda-function-workflow.yml
permissions:
contents: read # default
id-token: write # aws auth
defaults:
run:
shell: bash
jobs:
create-lambda-function-asset:
runs-on: ubuntu-latest
steps:
- name: 'Checkout'
uses: actions/checkout@v4
- name: 'Create archive file'
shell: bash
working-directory: .github/actions/test-deploy-lambda-function-workflow
run: |
sed -i "s/const VERSION = 'dev'/const VERSION = '${{ github.sha }}'/" index.js
zip archive.zip ./index.js
- name: 'Upload the archive file'
uses: actions/upload-artifact@v3
with:
name: lambda-function
path: .github/actions/test-deploy-lambda-function-workflow/archive.zip
run-deploy-lambda-function-workflow:
uses: ./.github/workflows/deploy-lambda-function.yml
needs: create-lambda-function-asset
with:
environment: staging
# lambda options
pattern: archive.zip
artifact-name: lambda-function
function-name: shopsmart-github-actions-tests
function-tags: test=shopsmart/github-actions/deploy-lambda-function-workflow
s3-bucket: shopsmart-github-actions-tests
s3-key: ${{ github.sha }}/archive.zip
current-version-path: .current-versions/staging
# aws options
role-name: github-actions-tests
# slack options
notify-slack: true
application: github-actions
secrets:
aws-account-id: ${{ secrets.AWS_ACCOUNT_ID }}
slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }}
validate-deploy-lambda-function-workflow:
name: 'Run validation against the deploy-lambda-function workflow run'
needs: run-deploy-lambda-function-workflow
runs-on: ubuntu-latest
steps:
- name: 'Checkout'
uses: actions/checkout@v4
- uses: ./.github/actions/test-deploy-lambda-function-workflow
with:
published-version: ${{ needs.run-deploy-lambda-function-workflow.outputs.published-version }}
aws-account-id: ${{ secrets.AWS_ACCOUNT_ID }}