-
Notifications
You must be signed in to change notification settings - Fork 24
37 lines (30 loc) · 1022 Bytes
/
main.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
name: CI
on: [push, pull_request]
jobs:
ci:
name: CI
runs-on: ubuntu-latest
steps:
- name: Checkout the source code
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Install Rust
run: rustup update stable && rustup default stable
- name: Check formatting
run: cargo fmt -- --check
- name: Run the test suite
run: cargo test
- name: Build the Docker container
run: docker build -t rust-log-analyzer .
- name: Deploy to production
uses: rust-lang/simpleinfra/github-actions/upload-docker-image@master
with:
image: rust-log-analyzer
repository: rust-log-analyzer
region: us-west-1
redeploy_ecs_cluster: rust-ecs-prod
redeploy_ecs_service: rust-log-analyzer
aws_access_key_id: "${{ secrets.AWS_ACCESS_KEY_ID }}"
aws_secret_access_key: "${{ secrets.AWS_SECRET_ACCESS_KEY }}"
if: github.ref == 'refs/heads/master'