Skip to content

Instantly share code, notes, and snippets.

@Mirch
Last active January 27, 2022 20:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Mirch/3f35bfeb984e80b73b0e1d6fbf90ecc7 to your computer and use it in GitHub Desktop.
Save Mirch/3f35bfeb984e80b73b0e1d6fbf90ecc7 to your computer and use it in GitHub Desktop.
name: Rust CRUD pipeline
on:
push:
branches: [ master ]
paths:
- 'rust_crud/**'
- '.github/workflows/rust-crud-pipeline.yml'
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./rust_crud
steps:
- uses: actions/checkout@v2
- name: Add target
run: rustup target add x86_64-unknown-linux-musl
- name: Build RUST functions
run: python3 rust_build.py
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: eu-west-1
- name: Setup Terraform
uses: hashicorp/setup-terraform@v1
with:
cli_config_credentials_token: ${{ secrets.TF_API_KEY }}
- name: Terraform init
run: terraform init
- name: Terraform apply
run: terraform apply -auto-approve
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment