Skip to content

Autocommit

Autocommit #35

Workflow file for this run

name: Docker Image CI
on:
push:
tags:
- 'v*' # This will trigger the workflow for any tag that starts with v
jobs:
build:
runs-on: ubuntu-latest # Lightweight OS for Docker builds
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: ./Dockerfiles
file: ./Dockerfiles/Dockerfile_amazonlinux_2023 # Specify your custom Dockerfile name
push: true
tags: gfish/devenv_amazonlinux_2023:${{ github.ref_name }} # Use the tag that was pushed
platforms: linux/amd64,linux/arm64 # Specify target platforms
- name: Scan image for vulnerabilities
uses: aquasecurity/trivy-action@0.20.0
with:
image-ref: gfish/devenv_amazonlinux_2023:${{ github.ref_name }}
format: 'table'
severity: 'HIGH,CRITICAL'