Skip to content

Commit

Permalink
Merge pull request #17 from kudos-ink/create-manual-import-workflow
Browse files Browse the repository at this point in the history
feat: add manually triggered import workflow
  • Loading branch information
CJ13th authored Sep 25, 2024
2 parents b82be18 + 1ada3bf commit d5508b2
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/manual-trigger-import.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,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

0 comments on commit d5508b2

Please sign in to comment.