Skip to content

Commit

Permalink
Merge pull request #18 from kudos-ink/change-order-redeploy-yml
Browse files Browse the repository at this point in the history
change action order
  • Loading branch information
CJ13th authored Sep 25, 2024
2 parents abfa6f3 + 44e1ace commit 93bf014
Showing 1 changed file with 19 additions and 16 deletions.
35 changes: 19 additions & 16 deletions .github/workflows/redeploy-lambdas.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,6 @@ jobs:
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: Set up environment to detect changes
id: changes
run: |
Expand All @@ -48,6 +32,25 @@ jobs:
echo "CHANGED_NOTIFICATION=true" >> $GITHUB_ENV
fi
- name: Install Rust
if: env.CHANGED_IMPORT == 'true' || env.CHANGED_SYNC == 'true' || env.CHANGED_NOTIFICATION == 'true'
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable

- name: Install Cargo Lambda with pip3
if: env.CHANGED_IMPORT == 'true' || env.CHANGED_SYNC == 'true' || env.CHANGED_NOTIFICATION == 'true'
run: |
pip3 install cargo-lambda
- name: Configure AWS credentials
if: env.CHANGED_IMPORT == 'true' || env.CHANGED_SYNC == 'true' || env.CHANGED_NOTIFICATION == 'true'
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: Build and deploy Import Lambda function
if: env.CHANGED_IMPORT == 'true'
run: |
Expand Down

0 comments on commit 93bf014

Please sign in to comment.