Skip to content

v0.0.1-docker nginx-utils Container Image #19

v0.0.1-docker nginx-utils Container Image

v0.0.1-docker nginx-utils Container Image #19

Workflow file for this run

name: Build and Push Docker Image for nginx-utils container
permissions:
contents: read
packages: write
actions: write
on:
release:
types: [created]
env:
RELEASE_VERSION: ${{ github.event.release.tag_name }}
jobs:
run-on-release:
if: endsWith(github.event.release.tag_name, '-docker')
runs-on: ubuntu-latest
steps:
- name: Starting Release Build
run: echo "Starting Release Build for ${{ github.event.release.tag_name }}"
- name: Checkout code
uses: actions/[email protected]
# Step 2: Debug: Verify api_stats.sh and repository content
- name: List repository files
run: ls -R .; pwd
- name: Set up Docker Buildx
uses: docker/[email protected]
- name: Log in to GitHub Container Registry
uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/[email protected]
with:
context: .
file: nginx-utils/Dockerfile
push: true
platforms: linux/amd64,linux/arm64
tags: |
ghcr.io/nginx/nginx-utils:${{ env.RELEASE_VERSION }}
ghcr.io/nginx/nginx-utils:latest
# Step 5: Install Trivy for Vulnerability Scanning
- name: Install Trivy and scan image for vulnerabilities
uses: aquasecurity/[email protected]
with:
image-ref: ghcr.io/${{ github.repository_owner }}/nginx-utils:latest
format: json
output: vuln-report.json
- name: Upload Vulnerability Report
uses: actions/[email protected]
with:
name: vuln-report
path: vuln-report.json