Skip to content

Bump the dependencies group with 9 updates #92

Bump the dependencies group with 9 updates

Bump the dependencies group with 9 updates #92

Workflow file for this run

name: Deploy
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
permissions:
id-token: write # This is required for requesting the JWT
contents: read # This is required for actions/checkout
jobs:
build-deploy:
runs-on: ubuntu-latest
env:
REGION: us-east-1
environment: main
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "20"
- uses: actions/setup-python@v4
with:
python-version: "3.12"
- name: Extract branch name
id: extract_branch
shell: bash
run: |
echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
- name: Clean up Branch Name (Valid for CloudFormation Stack Name)
id: formatted_branch
env:
DATA: ${{ steps.extract_branch.outputs.branch }}
run: |
noSpecialChars="$(echo "$DATA" | sed 's/[^a-zA-Z0-9 ]//g')" # Removing any character apart from numbers letters and spaces
lowercase="$(echo "$noSpecialChars" | awk '{print tolower($0)}')" # Making Lowercase
lowercaseDashRepoName="$(echo ${lowercase// /-})" # Replacing spaces with dashses
if [ ${#lowercaseDashRepoName} -gt 100 ]; then
lowercaseDashRepoName=${lowercaseDashRepoName:0:100} # Limiting to only 100 characters
fi
echo "BRANCH=$(echo "$lowercaseDashRepoName")" >> "$GITHUB_OUTPUT"
- name: Echo'ing Branch Names (For Debugging)
run: |
echo ${{ steps.formatted_branch.outputs.BRANCH }}
echo ${{ steps.extract_branch.outputs.branch }}
- name: Setup Cloud Formation Linter with Latest Version
uses: scottbrenner/cfn-lint-action@v2
- name: Print the Cloud Formation Linter Version & Run Linter.
run: |
cfn-lint --version
cfn-lint -t ./template.yml
- uses: aws-actions/setup-sam@v2
- uses: aws-actions/configure-aws-credentials@v4
with:
audience: sts.amazonaws.com
aws-region: ${{ env.REGION }}
role-to-assume: arn:aws:iam::377117578606:role/CodeScanningToSlack
- run: |
cd ./functions/codeScanningToSlack
npm cache clean --force
npm install
npm run build
- run: |
cd ./functions/githubWebhookIPValidator
npm cache clean --force
npm install
npm run build
- run: sam build --use-container
- run: sam deploy --debug --no-confirm-changeset --no-fail-on-empty-changeset --stack-name CodeScanningToSlackStack-${{ steps.formatted_branch.outputs.BRANCH }} --capabilities CAPABILITY_IAM --region ${{ env.REGION }} --resolve-s3