Skip to content

👷 Added deploy workflow #1

👷 Added deploy workflow

👷 Added deploy workflow #1

Workflow file for this run

name: Connect to AWS role, build and push to ECR
on:
push:
branches: [ main ]
tags:
- "v*.*.*"
pull_request:
branches: [ main ]
permissions:
id-token: write # This is required for requesting the JWT
contents: read # This is required for actions/checkout
jobs:
ExportDependencies:
runs-on: ubuntu-latest
steps:
- name: Git clone the repository
uses: actions/checkout@v4
- name: Install poetry & poetry export
run: |
pipx install poetry
pipx inject poetry poetry-plugin-export
- name: Cache poetry
uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: 'poetry'
- name: Export requirements.txt
run: poetry export -f requirements.txt --output requirements.txt --without-hashes
AssumeRoleAndPush:
runs-on: ubuntu-latest
steps:
- name: Git clone the repository
uses: actions/checkout@v4
- name: Configure aws credentials
uses: aws-actions/[email protected]
with:
role-to-assume: ${{ IAM_ROLE_ARN }}

Check failure on line 40 in .github/workflows/deploy.yml

View workflow run for this annotation

GitHub Actions / Connect to AWS role, build and push to ECR

Invalid workflow file

The workflow is not valid. .github/workflows/deploy.yml (Line: 40, Col: 27): Unrecognized named-value: 'IAM_ROLE_ARN'. Located at position 1 within expression: IAM_ROLE_ARN .github/workflows/deploy.yml (Line: 44, Col: 14): Unrecognized named-value: 'ECR_REGISTRY'. Located at position 1 within expression: ECR_REGISTRY
role-session-name: GitHub_to_AWS_via_FederatedOIDC
aws-region: "eu-west-3"
- name: Build, tag, and push image to Amazon ECR
run: |
docker build --platform linux/amd64 -t ${{ ECR_REGISTRY }}/inews:latest .
docker push ${{ ECR_REGISTRY }}/inews:latest
aws lambda update-function-code \
--function-name inews \
--image-uri ${{ ECR_REGISTRY }}/inews:latest > /dev/null