diff --git a/.github/workflows/bot-deploy.yml b/.github/workflows/bot-deploy.yml index a633de5..1a4df83 100644 --- a/.github/workflows/bot-deploy.yml +++ b/.github/workflows/bot-deploy.yml @@ -16,49 +16,9 @@ jobs: actions: read security-events: write contents: read - uses: notdodo/github-actions/.github/workflows/rust-ci.yml@rust-ci-v0.1.0 + id-token: write + uses: notdodo/github-actions/.github/workflows/rust-ci.yml@rust-ci-v0.1.1 with: working-directory: ./app/bot - - lambda-bot-deploy: - needs: rust-ci-bot - name: Deploy Lambda - runs-on: ubuntu-latest - permissions: - contents: read - id-token: write - defaults: - run: - working-directory: ./app/bot - steps: - - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 - # v4.2.1 - with: - fetch-depth: 0 - - uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 - # v4.0.2 - with: - role-to-assume: arn:aws:iam::841162699174:role/erfiume-oidc-write - aws-region: eu-west-1 - retry-max-attempts: 2 - - name: Cargo cache - uses: swatinem/rust-cache@82a92a6e8fbeee089604da2575dc567ae9ddeaab - # v2.7.5 - with: - cache-on-failure: true - cache-all-crates: true - workspaces: ./app/bot - - name: Install Zig toolchain - uses: korandoru/setup-zig@v1 - with: - zig-version: master - - name: Install Cargo Lambda - uses: jaxxstorm/action-install-gh-release@v1.12.0 - with: - repo: cargo-lambda/cargo-lambda - platform: linux - arch: x86_64 - - name: Build and deploy Lambda - run: | - cargo lambda build --release - cargo lambda deploy + deploy-lambda: true + aws-role: arn:aws:iam::841162699174:role/erfiume-oidc-write diff --git a/.github/workflows/fetcher-deploy.yml b/.github/workflows/fetcher-deploy.yml index c187b3c..09d32cb 100644 --- a/.github/workflows/fetcher-deploy.yml +++ b/.github/workflows/fetcher-deploy.yml @@ -16,49 +16,9 @@ jobs: actions: read security-events: write contents: read - uses: notdodo/github-actions/.github/workflows/rust-ci.yml@rust-ci-v0.1.0 + id-token: write + uses: notdodo/github-actions/.github/workflows/rust-ci.yml@rust-ci-v0.1.1 with: working-directory: ./app/fetcher - - lambda-fetcher-deploy: - needs: rust-ci-fetcher - name: Deploy Lambda - runs-on: ubuntu-latest - permissions: - contents: read - id-token: write - defaults: - run: - working-directory: ./app/fetcher - steps: - - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 - # v4.2.1 - with: - fetch-depth: 0 - - uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 - # v4.0.2 - with: - role-to-assume: arn:aws:iam::841162699174:role/erfiume-oidc-write - aws-region: eu-west-1 - retry-max-attempts: 2 - - name: Cargo cache - uses: swatinem/rust-cache@82a92a6e8fbeee089604da2575dc567ae9ddeaab - # v2.7.5 - with: - cache-on-failure: true - cache-all-crates: true - workspaces: ./app/fetcher - - name: Install Zig toolchain - uses: korandoru/setup-zig@v1 - with: - zig-version: master - - name: Install Cargo Lambda - uses: jaxxstorm/action-install-gh-release@v1.12.0 - with: - repo: cargo-lambda/cargo-lambda - platform: linux - arch: x86_64 - - name: Build and deploy Lambda - run: | - cargo lambda build --release - cargo lambda deploy + deploy-lambda: true + aws-role: arn:aws:iam::841162699174:role/erfiume-oidc-write diff --git a/app/bot/src/main.rs b/app/bot/src/main.rs index 56d7b77..7035ab5 100644 --- a/app/bot/src/main.rs +++ b/app/bot/src/main.rs @@ -47,7 +47,7 @@ async fn main() -> Result<(), LambdaError> { async fn lambda_handler(event: LambdaEvent) -> Result { let bot = Bot::from_env(); let me: Me = bot.get_me().await?; - info!("{:?}", event.payload); + info!("{:?}", event); let outer_json: Value = serde_json::from_value( event