-
Notifications
You must be signed in to change notification settings - Fork 2
44 lines (36 loc) · 1.15 KB
/
manual-trigger-import.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Manually trigger the import
on:
workflow_dispatch:
inputs:
json_file:
description: 'Path to the initial JSON file'
required: true
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- name: Install Cargo Lambda with pip3
run: |
pip3 install cargo-lambda
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- name: Generate import payload
run: |
cargo run -p generate_import_payload -- ${{ github.event.inputs.json_file }}
- name: Invoke remote lambda function
run: |
cd src/import
FILE_NAME=$(basename "${{ github.event.inputs.json_file }}")
cargo lambda invoke --remote gh-import-issues --region us-east-1 --data-file payloads/$FILE_NAME