Skip to content

add permissions

add permissions #1

name: AWS publish artifacts to S3
permissions:
id-token: write
contents: read
on:
workflow_dispatch:
inputs:
region:
description: 'region on which you want to deploy'
type: choice
options:
- eu-west-1
- us-east-1
required: true
architecture:
description: 'architecture'
type: choice
options:
- x86_64
- arm64
required: true
jobs:
setup:
runs-on: ubuntu-latest
outputs:
runner: ${{ steps.select.outputs.runner }}
steps:
- name: Check branch
id: select
run: |
if [ ${{ inputs.architecture }} == 'x86_64' ]; then
echo "runner=ubuntu-latest" >> $GITHUB_OUTPUT
else
echo "runner=self-hosted" >> $GITHUB_OUTPUT
fi
cat $GITHUB_OUTPUT
build-upload:
needs: setup
runs-on: ${{ needs.setup.outputs.runner }}
steps:
- uses: actions/checkout@v3
- name: Delete huge unnecessary folders
run: |
rm -rf /opt/hostedtoolcache
rm -rf /usr/share/dotnet
rm -rf /opt/ghc
rm -rf "$AGENT_TOOLSDIRECTORY"
- name: configure aws credentials
uses: aws-actions/[email protected]

Check failure on line 52 in .github/workflows/aws-publish-artifact-to-s3.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/aws-publish-artifact-to-s3.yml

Invalid workflow file

You have an error in your yaml syntax on line 52
with:
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
role-session-name: GitHub_Action_LambdaPerf_Session
aws-region: ${{ inputs.region }}
- name: build and deploy
env:
ARCHITECTURE: ${{ inputs.architecture }}
AWS_REGION: ${{ inputs.region }}
run: |
cd s3-uploader
yarn install
node app.mjs