Skip to content

Commit

Permalink
hotfix: rust-ci
Browse files Browse the repository at this point in the history
  • Loading branch information
notdodo committed Oct 20, 2024
1 parent ba95830 commit 750f4bc
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 89 deletions.
48 changes: 4 additions & 44 deletions .github/workflows/bot-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,49 +16,9 @@ jobs:
actions: read
security-events: write
contents: read
uses: notdodo/github-actions/.github/workflows/[email protected]
id-token: write
uses: notdodo/github-actions/.github/workflows/[email protected]
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/[email protected]
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
48 changes: 4 additions & 44 deletions .github/workflows/fetcher-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,49 +16,9 @@ jobs:
actions: read
security-events: write
contents: read
uses: notdodo/github-actions/.github/workflows/[email protected]
id-token: write
uses: notdodo/github-actions/.github/workflows/[email protected]
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/[email protected]
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
2 changes: 1 addition & 1 deletion app/bot/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ async fn main() -> Result<(), LambdaError> {
async fn lambda_handler(event: LambdaEvent<Value>) -> Result<Value, LambdaError> {
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
Expand Down

0 comments on commit 750f4bc

Please sign in to comment.