Skip to content

Merge pull request #12 from Tivix/ip_redir #37

Merge pull request #12 from Tivix/ip_redir

Merge pull request #12 from Tivix/ip_redir #37

Workflow file for this run

name: docker-nginx
on:
push:
tags:
- v*
jobs:
main:
runs-on: ubuntu-22.04
permissions:
contents: read
packages: write
steps:
- uses: FranzDiebold/github-env-vars-action@v2
- name: Checkout
uses: actions/checkout@v3
- name: Prepare docker buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
run: |
echo "${{ secrets.DOCKER_HUB_PASS }}" | docker login -u ${{ secrets.DOCKER_HUB_USER }} --password-stdin
echo "${{ secrets.GITHUB_TOKEN }}" | docker login -u ${{ github.actor }} --password-stdin ghcr.io
- name: Build Docker image
uses: docker/build-push-action@v3
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
cache-from: type=gha
cache-to: type=gha,mode=max
tags: tivix/docker-nginx:${{ github.sha }}, tivix/docker-nginx:${{ env.CI_REF_NAME }}, ghcr.io/tivix/docker-nginx:${{ env.CI_REF_NAME }}
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
image-ref: "tivix/docker-nginx:${{ github.sha }}"
format: "table"
exit-code: "1"
ignore-unfixed: true
vuln-type: "os,library"
severity: "CRITICAL,HIGH"
skip-dirs: /code/certs/
hide-progress: true