-
Notifications
You must be signed in to change notification settings - Fork 1
44 lines (36 loc) · 1.08 KB
/
docker-image.yaml
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
38
39
40
41
42
43
44
name: Build, Push Docker Image, and Code Analysis
on:
push:
branches: [ master ]
paths:
- 'aws-ec2-instance-checker/**'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check Out Code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.10' # adjust this based on your project's Python version
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install bandit
- name: Run Bandit
run: bandit -r aws-ec2-instance-checker
continue-on-error: true
- name: Log in to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and Push Docker Image
uses: docker/build-push-action@v2
with:
context: aws-ec2-instance-checker
push: true
tags: |
fdervisi/aws-ec2-instance-checker:${{ github.run_number }}.0.0
fdervisi/aws-ec2-instance-checker:latest