Skip to content

Manually trigger the import #16

Manually trigger the import

Manually trigger the import #16

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