Skip to content

Bump eslint from 9.16.0 to 9.17.0 in /open-social-front-v2 (#1545) #1279

Bump eslint from 9.16.0 to 9.17.0 in /open-social-front-v2 (#1545)

Bump eslint from 9.16.0 to 9.17.0 in /open-social-front-v2 (#1545) #1279

Workflow file for this run

name: 'Open Social Deploy'
on:
push:
branches:
- main
jobs:
sam-app-docker:
name: 'Sam App Build Docker Image'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3.2.0
with:
platforms: linux/amd64
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Registry
uses: docker/login-action@v3.3.0
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v6.10.0
with:
context: ./actions/aws-sam
file: ./actions/aws-sam/Dockerfile.build
push: true
platforms: linux/amd64
cache-to: type=inline
cache-from: type=registry,ref=${{ secrets.DOCKER_REGISTRY }}/aws-sam-action:latest
tags: ${{ secrets.DOCKER_REGISTRY }}/aws-sam-action:latest
infrastructure:
name: 'Basic Infrastructure'
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./infrastructure
steps:
- name: 'Checkout'
uses: actions/checkout@v4
- name: 'Configure AWS credentials'
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}
- name: 'Configure Terraform'
uses: hashicorp/setup-terraform@v3
with:
terraform_version: 1.1.4
- name: 'Terraform Init'
run: terraform init
- name: 'Terraform Validate'
run: terraform validate
- name: 'Terraform Format'
run: terraform fmt -check -diff
- name: 'Terraform Apply'
run: terraform apply -auto-approve
frontend:
name: 'Run Frontend Tests'
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./open-social-front-v2
steps:
- name: Checkout
uses: actions/checkout@v4
- name: 'Configure Node'
uses: actions/setup-node@v4
with:
node-version: '20'
- name: 'Node Cache'
uses: actions/cache@v4.2.0
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: 'Install Dependencies'
run: npm install
- name: 'Run Unit Tests'
run: npm run test-ci
sam-app:
name: 'SAM App Deploy'
runs-on: ubuntu-latest
needs: ['sam-app-docker', 'infrastructure', 'frontend']
steps:
- name: 'Checkout'
uses: actions/checkout@v4
- name: 'Cache dependencies'
uses: actions/cache@v4.2.0
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: 'Setup Python'
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: 'Install Pip Dependencies'
run: pip install -r open-social/tests/test_requirements.txt
- name: 'Run Unittests'
working-directory: ./open-social
run: |
pytest
env:
AWS_DEFAULT_REGION: 'eu-central-1'
- name: Login to Docker Registry
uses: docker/login-action@v3.3.0
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: 'Validate SAM App'
uses: ./actions/aws-sam
with:
sam_command: validate
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: ${{ secrets.AWS_REGION }}
- name: 'Build SAM App'
uses: ./actions/aws-sam
with:
sam_command: build
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: ${{ secrets.AWS_REGION }}
- name: 'Deploy SAM App'
uses: ./actions/aws-sam
with:
sam_command: deploy --template-file .aws-sam/build/template.yaml --stack-name open-social --capabilities CAPABILITY_NAMED_IAM --s3-bucket open-social-sam-layers --no-fail-on-empty-changeset
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: ${{ secrets.AWS_REGION }}