steps: # (1) lambrollのバージョンを取得する - shell: bash run: echo "LAMBROLL_VERSION=v`cat .lambroll-version`" >> $GITHUB_ENV # (2) OIDC認証でAWSアクセスキーを取得する - name: configure AWS credentials uses: aws-actions/configure-aws-credentials@v2 with: aws-region: ap-northeast-1 role-to-assume: arn:aws:iam::${{ inputs.aws-account-id }}:role/${{ inputs.app-name }}-${{ inputs.stage }}-deploy role-session-name: github-actions-${{ github.run_id }} # (3) 公式で配布されているlambrollのアクションを使用する - uses: fujiwara/lambroll@v0 with: version: ${{ env.LAMBROLL_VERSION }} # (4) 必要であれば、ここにビルドや前処理のステップが入る # (5) デプロイのコマンドは、Makefileに記載して、それを実行する - name: deploy shell: bash working-directory: ${{ inputs.working-directory }} run: make -e github-actions/deploy Lambdaのビルド・前処理・デプロイのコマンドって バラバラでGitHub Actionsで共通化出来ない ↓ 必要なコマンドをMakefileで用意して GitHub Actions内で実行する方法を採用した